diff options
| author | Björn Steinbrink <bsteinbr@gmail.com> | 2015-09-11 20:10:43 +0200 |
|---|---|---|
| committer | Björn Steinbrink <bsteinbr@gmail.com> | 2015-09-14 11:36:09 +0200 |
| commit | 3ef75d5774cb9a7cf839a69341c620b98fa9c7df (patch) | |
| tree | 390d168efade16f67b4651405d89a0884d51ee0a /src/libcore | |
| parent | e4e67bd489934702e4958a03bb4c948919d38920 (diff) | |
| download | rust-3ef75d5774cb9a7cf839a69341c620b98fa9c7df.tar.gz rust-3ef75d5774cb9a7cf839a69341c620b98fa9c7df.zip | |
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/libcore')
| -rw-r--r-- | src/libcore/lib.rs | 1 | ||||
| -rw-r--r-- | src/libcore/panicking.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 78a467e3657..94408072932 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -79,6 +79,7 @@ #![feature(optin_builtin_traits)] #![feature(reflect)] #![feature(rustc_attrs)] +#![feature(unwind_attributes)] #![cfg_attr(stage0, feature(simd))] #![cfg_attr(not(stage0), feature(repr_simd, platform_intrinsics))] #![feature(staged_api)] diff --git a/src/libcore/panicking.rs b/src/libcore/panicking.rs index b443ae0636f..93ddfa72f63 100644 --- a/src/libcore/panicking.rs +++ b/src/libcore/panicking.rs @@ -62,6 +62,7 @@ pub fn panic_fmt(fmt: fmt::Arguments, file_line: &(&'static str, u32)) -> ! { #[allow(improper_ctypes)] extern { #[lang = "panic_fmt"] + #[unwind] fn panic_impl(fmt: fmt::Arguments, file: &'static str, line: u32) -> !; } let (file, line) = *file_line; |
