Skip to content

Commit 73702d5

Browse files
committed
Turn off the alignment check pass, remove the panic test for it
The panic test is now counted as an error test; we encounter a Terminate terminator, and emit an interpreter error, as opposed to just terminating due to a panic. So this test should have broken with rust-lang#102906 but wasn't because the Miri test suite is currently broken in rust-lang/rust: rust-lang#110102
1 parent 6efdf4d commit 73702d5

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

src/tools/miri/src/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,13 @@ pub use crate::tag_gc::{EvalContextExt as _, VisitTags};
124124

125125
/// Insert rustc arguments at the beginning of the argument list that Miri wants to be
126126
/// set per default, for maximal validation power.
127+
/// Also disable the MIR pass that inserts an alignment check on every pointer dereference. Miri
128+
/// does that too, and with a better error message.
127129
pub const MIRI_DEFAULT_ARGS: &[&str] = &[
128130
"--cfg=miri",
129131
"-Zalways-encode-mir",
130132
"-Zextra-const-ub-checks",
131133
"-Zmir-emit-retag",
132134
"-Zmir-opt-level=0",
135+
"-Zmir-enable-passes=-CheckAlignment",
133136
];

src/tools/miri/tests/panic/alignment-assertion.rs

-9
This file was deleted.

src/tools/miri/tests/panic/alignment-assertion.stderr

-2
This file was deleted.

0 commit comments

Comments
 (0)