Skip to content

Commit

Permalink
Auto merge of #111506 - RalfJung:miri, r=oli-obk
Browse files Browse the repository at this point in the history
update Miri

and run mir-opt-level=4 tests in rustc CI so issues like rust-lang/rust#111422 are caught before they land.

r? `@oli-obk` due to the bootstrap changes
  • Loading branch information
bors committed May 12, 2023
2 parents 240e314 + 1e119e0 commit 9ec98d9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
3 changes: 1 addition & 2 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ function run_tests {
# them. Also error locations change so we don't run the failing tests.
# We explicitly enable debug-assertions here, they are disabled by -O but we have tests
# which exist to check that we panic on debug assertion failures.
#FIXME: Disabled due to <https://github.com/rust-lang/rust/issues/111422>.
#MIRIFLAGS="${MIRIFLAGS:-} -O -Zmir-opt-level=4 -Cdebug-assertions=yes" MIRI_SKIP_UI_CHECKS=1 ./miri test -- tests/{pass,panic}
MIRIFLAGS="${MIRIFLAGS:-} -O -Zmir-opt-level=4 -Cdebug-assertions=yes" MIRI_SKIP_UI_CHECKS=1 ./miri test -- tests/{pass,panic}

# Also run some many-seeds tests. 64 seeds means this takes around a minute per test.
for FILE in tests/many-seeds/*.rs; do
Expand Down
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
65dfca8488d635552eb246eb8e15df646e987cff
0b795044c6f0854445f1f2bb6443e87848e150d1
2 changes: 2 additions & 0 deletions tests/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ fn run_tests(mode: Mode, path: &str, target: &str, with_dependencies: bool) -> R
"run".into(), // There is no `cargo miri build` so we just use `cargo miri run`.
];
}

eprintln!(" Compiler: {}", config.program.display());
ui_test::run_tests_generic(
config,
// The files we're actually interested in (all `.rs` files).
Expand Down
3 changes: 2 additions & 1 deletion tests/fail/intrinsics/simd-scatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ fn main() {
unsafe {
let mut vec: Vec<i8> = vec![10, 11, 12, 13, 14, 15, 16, 17, 18];
let idxs = Simd::from_array([9, 3, 0, 17]);
Simd::from_array([-27, 82, -41, 124]).scatter_select_unchecked( //~ERROR: pointer to 1 byte starting at offset 9 is out-of-bounds
Simd::from_array([-27, 82, -41, 124]).scatter_select_unchecked(
//~^ERROR: pointer to 1 byte starting at offset 9 is out-of-bounds
&mut vec,
Mask::splat(true),
idxs,
Expand Down
1 change: 1 addition & 0 deletions tests/fail/intrinsics/simd-scatter.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ error: Undefined Behavior: dereferencing pointer failed: ALLOC has size 9, so po
--> $DIR/simd-scatter.rs:LL:CC
|
LL | / Simd::from_array([-27, 82, -41, 124]).scatter_select_unchecked(
LL | |
LL | | &mut vec,
LL | | Mask::splat(true),
LL | | idxs,
Expand Down

0 comments on commit 9ec98d9

Please sign in to comment.