We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 38ad909 commit 1ec6779Copy full SHA for 1ec6779
src/tools/miri/tests/pass/shims/env/var.rs
@@ -1,3 +1,4 @@
1
+//@compile-flags: -Zmiri-preemption-rate=0
2
use std::env;
3
use std::thread;
4
@@ -26,6 +27,8 @@ fn main() {
26
27
println!("{:#?}", env::vars().collect::<Vec<_>>());
28
29
// Do things concurrently, to make sure there's no data race.
30
+ // We disable preemption to make sure the lock is not contended;
31
+ // that means we don't hit e.g. the futex codepath on Android (which we don't support).
32
let t = thread::spawn(|| {
33
env::set_var("MIRI_TEST", "42");
34
});
0 commit comments