We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3df6714 commit 4e74f9fCopy full SHA for 4e74f9f
tests/compile-fail/data_race/read_write_race_stack.rs
@@ -1,5 +1,5 @@
1
// ignore-windows: Concurrency on Windows is not supported yet.
2
-// compile-flags: -Zmiri-disable-isolation
+// compile-flags: -Zmiri-disable-isolation -Zmir-opt-level=0
3
4
use std::thread::{spawn, sleep};
5
use std::ptr::null_mut;
@@ -40,9 +40,7 @@ pub fn main() {
40
41
sleep(Duration::from_millis(1000));
42
43
- // Read, the add 1 fixes -Z mir-opt-level=3 from removing the read via dest-prop and breaking
44
- // the test.
45
- stack_var + 1 //~ ERROR Data race detected between Read on Thread(id = 1) and Write on Thread(id = 2)
+ stack_var //~ ERROR Data race detected between Read on Thread(id = 1) and Write on Thread(id = 2)
46
});
47
48
let j2 = spawn(move || {
0 commit comments