1
Fork 0

Rollup merge of #58453 - jethrogb:jb/sgx-panic-abort, r=nagisa

SGX target: fix panic = abort

What is the difference between `no_mangle` and `rustc_std_internal_symbol`?
This commit is contained in:
Mazdak Farrokhzad 2019-02-23 09:25:24 +01:00 committed by GitHub
commit 4f99061874
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -58,8 +58,9 @@ pub unsafe extern fn __rust_start_panic(_payload: usize) -> u32 {
#[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();
}
}

View file

@ -204,6 +204,7 @@ pub unsafe extern "C" fn __rust_print_err(m: *mut u8, s: i32) {
}
#[no_mangle]
// NB. used by both libunwind and libpanic_abort
pub unsafe extern "C" fn __rust_abort() {
::sys::abort_internal();
}