diff --git a/rust-version b/rust-version index 8f3b1d39fd04..37d1eb0fbdec 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -7665c3543079ebc3710b676d0fd6951bedfd4b29 +8824d131619e58a38bde8bcf56401629b91a204a diff --git a/src/operator.rs b/src/operator.rs index e7a43ac95520..2c77830a6d14 100644 --- a/src/operator.rs +++ b/src/operator.rs @@ -35,11 +35,13 @@ impl<'mir, 'tcx> EvalContextExt<'tcx> for super::MiriEvalContext<'mir, 'tcx> { Immediate::Scalar(l) => (l.check_init()?.to_bits(size)?, 0), Immediate::ScalarPair(l1, l2) => (l1.check_init()?.to_bits(size)?, l2.check_init()?.to_bits(size)?), + Immediate::Uninit => throw_ub!(InvalidUninitBytes(None)), }; let right = match **right { Immediate::Scalar(r) => (r.check_init()?.to_bits(size)?, 0), Immediate::ScalarPair(r1, r2) => (r1.check_init()?.to_bits(size)?, r2.check_init()?.to_bits(size)?), + Immediate::Uninit => throw_ub!(InvalidUninitBytes(None)), }; let res = match bin_op { Eq => left == right, diff --git a/tests/fail/data_race/stack_pop_race.rs b/tests/fail/data_race/stack_pop_race.rs index fa81306b78ca..bae885600142 100644 --- a/tests/fail/data_race/stack_pop_race.rs +++ b/tests/fail/data_race/stack_pop_race.rs @@ -1,3 +1,4 @@ +// ignore-windows: Concurrency on Windows is not supported yet. // compile-flags: -Zmiri-preemption-rate=0 use std::thread; @@ -5,7 +6,9 @@ use std::thread; struct MakeSend(*const i32); unsafe impl Send for MakeSend {} -fn main() { race(0); } +fn main() { + race(0); +} // Using an argument for the ptr to point to, since those do not get StorageDead. fn race(local: i32) { diff --git a/tests/fail/data_race/stack_pop_race.stderr b/tests/fail/data_race/stack_pop_race.stderr index e7e2ba7e8bd9..ba830753f6ee 100644 --- a/tests/fail/data_race/stack_pop_race.stderr +++ b/tests/fail/data_race/stack_pop_race.stderr @@ -11,8 +11,8 @@ LL | } note: inside `main` at $DIR/stack_pop_race.rs:LL:CC --> $DIR/stack_pop_race.rs:LL:CC | -LL | fn main() { race(0); } - | ^^^^^^^ +LL | race(0); + | ^^^^^^^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/pass/unsized.rs b/tests/pass/unsized.rs index c7e0c7925753..d9beac4327d7 100644 --- a/tests/pass/unsized.rs +++ b/tests/pass/unsized.rs @@ -24,7 +24,7 @@ fn unsized_params() { f0(*c); let foo = "foo".to_string().into_boxed_str(); f1(*foo); - let sl: Box::<[i32]> = [0, 1, 2].to_vec().into_boxed_slice(); + let sl: Box<[i32]> = [0, 1, 2].to_vec().into_boxed_slice(); f2(5, *sl); let p: Box = Box::new((1, 2)); f3(*p);