about summary refs log tree commit diff
path: root/src/libstd/sys/common/libunwind.rs
diff options
context:
space:
mode:
authorBjörn Steinbrink <bsteinbr@gmail.com>2015-09-11 20:10:43 +0200
committerBjörn Steinbrink <bsteinbr@gmail.com>2015-09-14 11:36:09 +0200
commit3ef75d5774cb9a7cf839a69341c620b98fa9c7df (patch)
tree390d168efade16f67b4651405d89a0884d51ee0a /src/libstd/sys/common/libunwind.rs
parente4e67bd489934702e4958a03bb4c948919d38920 (diff)
Mark all extern functions as nounwind
Unwinding across an FFI boundary is undefined behaviour, so we can mark
all external function as nounwind. The obvious exception are those
functions that actually perform the unwinding.
Diffstat (limited to 'src/libstd/sys/common/libunwind.rs')
-rw-r--r--src/libstd/sys/common/libunwind.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstd/sys/common/libunwind.rs b/src/libstd/sys/common/libunwind.rs
index fde612014e9..c6bffb0f733 100644
--- a/src/libstd/sys/common/libunwind.rs
+++ b/src/libstd/sys/common/libunwind.rs
@@ -124,10 +124,12 @@ extern "C" {
     // iOS on armv7 uses SjLj exceptions and requires to link
     // against corresponding routine (..._SjLj_...)
     #[cfg(not(all(target_os = "ios", target_arch = "arm")))]
+    #[unwind]
     pub fn _Unwind_RaiseException(exception: *mut _Unwind_Exception)
                                   -> _Unwind_Reason_Code;
 
     #[cfg(all(target_os = "ios", target_arch = "arm"))]
+    #[unwind]
     fn _Unwind_SjLj_RaiseException(e: *mut _Unwind_Exception)
                                    -> _Unwind_Reason_Code;