mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-29 11:51:31 +03:00
SGX target: fix panic = abort
This commit is contained in:
@@ -58,8 +58,9 @@ unsafe fn abort() -> ! {
|
||||
|
||||
#[cfg(all(target_vendor="fortanix", target_env="sgx"))]
|
||||
unsafe fn abort() -> ! {
|
||||
extern "C" { pub fn panic_exit() -> !; }
|
||||
panic_exit();
|
||||
// call std::sys::abort_internal
|
||||
extern "C" { pub fn __rust_abort() -> !; }
|
||||
__rust_abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -204,6 +204,7 @@ pub unsafe fn destroy(&self) {}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
// NB. used by both libunwind and libpanic_abort
|
||||
pub unsafe extern "C" fn __rust_abort() {
|
||||
::sys::abort_internal();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user