Skip to content

Commit dfff5bf

Browse files
committed
panic_abort: call __rust_abort on xous
Xous does not properly handle invalid instructions. Instead, call `__rust_abort` and exit normally. Signed-off-by: Sean Cross <sean@xobs.io>
1 parent 823cba9 commit dfff5bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/panic_abort/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ pub unsafe fn __rust_start_panic(_payload: &mut dyn BoxMeUp) -> u32 {
4343
libc::abort();
4444
}
4545
} else if #[cfg(any(target_os = "hermit",
46-
all(target_vendor = "fortanix", target_env = "sgx")
46+
all(target_vendor = "fortanix", target_env = "sgx"),
47+
target_os = "xous"
4748
))] {
4849
unsafe fn abort() -> ! {
4950
// call std::sys::abort_internal

0 commit comments

Comments
 (0)