Skip to content

Commit cd5f8b4

Browse files
committed
Auto merge of rust-lang#2892 - RalfJung:rustup, r=RalfJung
Rustup
2 parents 81a4c1d + 18fd17d commit cd5f8b4

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

src/bootstrap/test.rs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,21 @@ impl Step for Miri {
613613
builder.run(&mut cargo);
614614
}
615615

616+
// Run it again for mir-opt-level 4 to catch some miscompilations.
617+
if builder.config.test_args().is_empty() {
618+
cargo.env("MIRIFLAGS", "-O -Zmir-opt-level=4 -Cdebug-assertions=yes");
619+
// Optimizations can change backtraces
620+
cargo.env("MIRI_SKIP_UI_CHECKS", "1");
621+
// Optimizations can change error locations and remove UB so don't run `fail` tests.
622+
cargo.args(&["tests/pass", "tests/panic"]);
623+
624+
let mut cargo = prepare_cargo_test(cargo, &[], &[], "miri", compiler, target, builder);
625+
{
626+
let _time = util::timeit(&builder);
627+
builder.run(&mut cargo);
628+
}
629+
}
630+
616631
// # Run `cargo miri test`.
617632
// This is just a smoke test (Miri's own CI invokes this in a bunch of different ways and ensures
618633
// that we get the desired output), but that is sufficient to make sure that the libtest harness
@@ -644,8 +659,10 @@ impl Step for Miri {
644659
cargo.env("RUST_BACKTRACE", "1");
645660

646661
let mut cargo = Command::from(cargo);
647-
let _time = util::timeit(&builder);
648-
builder.run(&mut cargo);
662+
{
663+
let _time = util::timeit(&builder);
664+
builder.run(&mut cargo);
665+
}
649666
}
650667
}
651668

src/tools/miri/ci.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ function run_tests {
4545
# them. Also error locations change so we don't run the failing tests.
4646
# We explicitly enable debug-assertions here, they are disabled by -O but we have tests
4747
# which exist to check that we panic on debug assertion failures.
48-
#FIXME: Disabled due to <https://github.com/rust-lang/rust/issues/111422>.
49-
#MIRIFLAGS="${MIRIFLAGS:-} -O -Zmir-opt-level=4 -Cdebug-assertions=yes" MIRI_SKIP_UI_CHECKS=1 ./miri test -- tests/{pass,panic}
48+
MIRIFLAGS="${MIRIFLAGS:-} -O -Zmir-opt-level=4 -Cdebug-assertions=yes" MIRI_SKIP_UI_CHECKS=1 ./miri test -- tests/{pass,panic}
5049

5150
# Also run some many-seeds tests. 64 seeds means this takes around a minute per test.
5251
for FILE in tests/many-seeds/*.rs; do

src/tools/miri/rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
699a862a3d4e4a2d5603c93297c0c44021ea72f5
1+
0b795044c6f0854445f1f2bb6443e87848e150d1

0 commit comments

Comments
 (0)