Skip to content

Commit

Permalink
panic_abort: call __rust_abort on xous
Browse files Browse the repository at this point in the history
Xous does not properly handle invalid instructions. Instead, call
`__rust_abort` and exit normally.

Signed-off-by: Sean Cross <sean@xobs.io>
  • Loading branch information
xobs committed Nov 8, 2022
1 parent e0da598 commit f4db122
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/panic_abort/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ pub unsafe fn __rust_start_panic(_payload: *mut &mut dyn BoxMeUp) -> u32 {
libc::abort();
}
} else if #[cfg(any(target_os = "hermit",
all(target_vendor = "fortanix", target_env = "sgx")
all(target_vendor = "fortanix", target_env = "sgx"),
target_os = "xous"
))] {
unsafe fn abort() -> ! {
// call std::sys::abort_internal
Expand Down

0 comments on commit f4db122

Please sign in to comment.