SGX target: fix panic = abort

This commit is contained in:
Jethro Beekman
2019-02-14 12:39:54 +05:30
parent 4772dc8087
commit 347a42e387
2 changed files with 4 additions and 2 deletions
+3 -2
View File
@@ -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();
}
}
+1
View File
@@ -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();
}