diff options
| author | Gary Guo <gary@garyguo.net> | 2022-05-18 03:51:52 +0100 |
|---|---|---|
| committer | Gary Guo <gary@garyguo.net> | 2022-06-08 21:32:41 +0100 |
| commit | 6ef203388483688b0a4598efbc63ee7295bff975 (patch) | |
| tree | 987623cb6b1214023462a9cb6e69f1dbb6471c08 /library/std/src | |
| parent | 09d52bc5d4260bac8b9a2ea8ac7a07c5c72906f1 (diff) | |
| download | rust-6ef203388483688b0a4598efbc63ee7295bff975.tar.gz rust-6ef203388483688b0a4598efbc63ee7295bff975.zip | |
Fix FFI-unwind unsoundness with mixed panic mode
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index b1c68ec43bc..fc2ff363513 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -210,6 +210,8 @@ #![allow(unused_lifetimes)] // Tell the compiler to link to either panic_abort or panic_unwind #![needs_panic_runtime] +// Ensure that std can be linked against panic_abort despite compiled with `-C panic=unwind` +#![cfg_attr(not(bootstrap), deny(ffi_unwind_calls))] // std may use features in a platform-specific way #![allow(unused_features)] #![cfg_attr(test, feature(internal_output_capture, print_internals, update_panic_count))] |
