diff options
| author | Sean Cross <sean@xobs.io> | 2022-11-07 19:04:47 +0800 |
|---|---|---|
| committer | Sean Cross <sean@xobs.io> | 2023-08-22 20:25:38 +0800 |
| commit | dfff5bf62f466fbf6f17f20dc847e8f98b943535 (patch) | |
| tree | 756178488feb5b4d28b0401c39ebb4fd5b8db157 /library/panic_abort | |
| parent | 823cba9cc8015772594344ce2aab6b70000934c9 (diff) | |
| download | rust-dfff5bf62f466fbf6f17f20dc847e8f98b943535.tar.gz rust-dfff5bf62f466fbf6f17f20dc847e8f98b943535.zip | |
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>
Diffstat (limited to 'library/panic_abort')
| -rw-r--r-- | library/panic_abort/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/panic_abort/src/lib.rs b/library/panic_abort/src/lib.rs index 76b35919658..2f8c2f77093 100644 --- a/library/panic_abort/src/lib.rs +++ b/library/panic_abort/src/lib.rs @@ -43,7 +43,8 @@ pub unsafe fn __rust_start_panic(_payload: &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 |
