]> git.lizzy.rs Git - rust.git/commitdiff
SGX target: fix panic = abort
authorJethro Beekman <jethro@fortanix.com>
Thu, 14 Feb 2019 07:09:54 +0000 (12:39 +0530)
committerJethro Beekman <jethro@fortanix.com>
Thu, 14 Feb 2019 07:09:54 +0000 (12:39 +0530)
src/libpanic_abort/lib.rs
src/libstd/sys/sgx/rwlock.rs

index edc97cd28a52af89d4d65147286cdf864904c821..8c20a6ea55ad03cdcd55aa9add54041f46ea6850 100644 (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();
     }
 }
 
index 33163a556c16df96f7e79e9ffaef52adb7ef0929..4dfbe86d14f4dedd2dd13f9d40925a127eb959d4 100644 (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();
 }