From dfff5bf62f466fbf6f17f20dc847e8f98b943535 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Mon, 7 Nov 2022 19:04:47 +0800 Subject: [PATCH] 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 --- library/panic_abort/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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