diff options
| author | Ralf Jung <post@ralfj.de> | 2023-09-21 07:57:38 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-09-21 08:43:56 +0200 |
| commit | 64708fbf9ef018e682ee9bb5716974f057e97129 (patch) | |
| tree | d5c322fe26df4831c25631db1de9576c738a79d5 | |
| parent | 59105177cc974182c61485e6695498f9c712c5d7 (diff) | |
| download | rust-64708fbf9ef018e682ee9bb5716974f057e97129.tar.gz rust-64708fbf9ef018e682ee9bb5716974f057e97129.zip | |
deprecate -Zmiri-disable-abi-check
6 files changed, 13 insertions, 1 deletions
diff --git a/src/tools/miri/README.md b/src/tools/miri/README.md index cedc558ebb8..f6a023181d8 100644 --- a/src/tools/miri/README.md +++ b/src/tools/miri/README.md @@ -362,7 +362,7 @@ Some of these are **unsound**, which means they can lead to Miri failing to detect cases of undefined behavior in a program. * `-Zmiri-disable-abi-check` disables checking [function ABI]. Using this flag - is **unsound**. + is **unsound**. This flag is **deprecated**. * `-Zmiri-disable-alignment-check` disables checking pointer alignment, so you can focus on other failures, but it means Miri can miss bugs in your program. Using this flag is **unsound**. diff --git a/src/tools/miri/src/bin/miri.rs b/src/tools/miri/src/bin/miri.rs index 1e9219d4bb2..8f90e4566ae 100644 --- a/src/tools/miri/src/bin/miri.rs +++ b/src/tools/miri/src/bin/miri.rs @@ -358,6 +358,10 @@ fn main() { since it is now enabled by default" ); } else if arg == "-Zmiri-disable-abi-check" { + eprintln!( + "WARNING: the flag `-Zmiri-disable-abi-check` is deprecated and planned to be removed.\n\ + If you have a use-case for it, please file an issue." + ); miri_config.check_abi = false; } else if arg == "-Zmiri-disable-isolation" { if matches!(isolation_enabled, Some(true)) { diff --git a/src/tools/miri/tests/fail/concurrency/unwind_top_of_stack.stderr b/src/tools/miri/tests/fail/concurrency/unwind_top_of_stack.stderr index ceb5955922a..fccd3fbbc9d 100644 --- a/src/tools/miri/tests/fail/concurrency/unwind_top_of_stack.stderr +++ b/src/tools/miri/tests/fail/concurrency/unwind_top_of_stack.stderr @@ -1,3 +1,5 @@ +WARNING: the flag `-Zmiri-disable-abi-check` is deprecated and planned to be removed. +If you have a use-case for it, please file an issue. thread '<unnamed>' panicked at $DIR/unwind_top_of_stack.rs:LL:CC: explicit panic note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind1.stderr b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind1.stderr index f181f90abd3..507b459b718 100644 --- a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind1.stderr +++ b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind1.stderr @@ -1,3 +1,5 @@ +WARNING: the flag `-Zmiri-disable-abi-check` is deprecated and planned to be removed. +If you have a use-case for it, please file an issue. thread 'main' panicked at $DIR/exported_symbol_bad_unwind1.rs:LL:CC: explicit panic note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/src/tools/miri/tests/fail/panic/bad_miri_start_panic.stderr b/src/tools/miri/tests/fail/panic/bad_miri_start_panic.stderr index 3bd2be03ea1..4e5a2dfba34 100644 --- a/src/tools/miri/tests/fail/panic/bad_miri_start_panic.stderr +++ b/src/tools/miri/tests/fail/panic/bad_miri_start_panic.stderr @@ -1,3 +1,5 @@ +WARNING: the flag `-Zmiri-disable-abi-check` is deprecated and planned to be removed. +If you have a use-case for it, please file an issue. error: Undefined Behavior: unwinding past a stack frame that does not allow unwinding --> $DIR/bad_miri_start_panic.rs:LL:CC | diff --git a/src/tools/miri/tests/pass/function_calls/disable_abi_check.stderr b/src/tools/miri/tests/pass/function_calls/disable_abi_check.stderr new file mode 100644 index 00000000000..e5b84f6d709 --- /dev/null +++ b/src/tools/miri/tests/pass/function_calls/disable_abi_check.stderr @@ -0,0 +1,2 @@ +WARNING: the flag `-Zmiri-disable-abi-check` is deprecated and planned to be removed. +If you have a use-case for it, please file an issue. |
