Skip to content

Commit

Permalink
Auto merge of #3071 - RalfJung:deprecate-disable-abi, r=oli-obk,saethlin
Browse files Browse the repository at this point in the history
deprecate -Zmiri-disable-abi-check

This was added in #1776 but I couldn't find any discussion or motivation.
  • Loading branch information
bors committed Sep 21, 2023
2 parents 988df79 + f0f762e commit 013c720
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**.
Expand Down
4 changes: 4 additions & 0 deletions src/bin/miri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
2 changes: 2 additions & 0 deletions tests/fail/concurrency/unwind_top_of_stack.stderr
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions tests/fail/function_calls/exported_symbol_bad_unwind1.stderr
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions tests/fail/panic/bad_miri_start_panic.stderr
Original file line number Diff line number Diff line change
@@ -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
|
Expand Down
2 changes: 2 additions & 0 deletions tests/pass/function_calls/disable_abi_check.stderr
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 013c720

Please sign in to comment.