Skip to content

Fix FFI-unwind unsoundness with mixed panic mode #97235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 2, 2022
Prev Previous commit
Skip ffi-unwind lint test with -Cpanic=abort
  • Loading branch information
nbdd0121 committed Jun 30, 2022
commit 0cf28dc95d8396aa207bddd2d4424963b64d0c16
2 changes: 2 additions & 0 deletions src/test/ui/unwind-abis/ffi-unwind-calls-lint.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// build-pass
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default

#![feature(c_unwind)]
#![warn(ffi_unwind_calls)]
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/unwind-abis/ffi-unwind-calls-lint.stderr
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
warning: call to foreign function with FFI-unwind ABI
--> $DIR/ffi-unwind-calls-lint.rs:19:14
--> $DIR/ffi-unwind-calls-lint.rs:21:14
|
LL | unsafe { foo(); }
| ^^^^^ call to foreign function with FFI-unwind ABI
|
note: the lint level is defined here
--> $DIR/ffi-unwind-calls-lint.rs:4:9
--> $DIR/ffi-unwind-calls-lint.rs:6:9
|
LL | #![warn(ffi_unwind_calls)]
| ^^^^^^^^^^^^^^^^

warning: call to function pointer with FFI-unwind ABI
--> $DIR/ffi-unwind-calls-lint.rs:23:5
--> $DIR/ffi-unwind-calls-lint.rs:25:5
|
LL | ptr();
| ^^^^^ call to function pointer with FFI-unwind ABI
Expand Down