Skip to content

Commit ec698fc

Browse files
committed
Fix FFI-unwind unsoundness with mixed panic mode
1 parent c752091 commit ec698fc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

std/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@
210210
#![allow(unused_lifetimes)]
211211
// Tell the compiler to link to either panic_abort or panic_unwind
212212
#![needs_panic_runtime]
213+
// Ensure that std can be linked against panic_abort despite compiled with `-C panic=unwind`
214+
#![cfg_attr(not(bootstrap), deny(ffi_unwind_calls))]
213215
// std may use features in a platform-specific way
214216
#![allow(unused_features)]
215217
#![cfg_attr(test, feature(internal_output_capture, print_internals, update_panic_count))]

0 commit comments

Comments
 (0)