about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-07-14 08:07:59 -0400
committerRalf Jung <post@ralfj.de>2022-07-14 08:07:59 -0400
commit820f322b86772fe3fdadebb587cc877efff4e61c (patch)
tree1b6341705d0819a4c0aaa68418ef8106543a07ff /tests
parenta272ca2cf7f4cfa227d9d9ffddf910aa2e0fb169 (diff)
downloadrust-820f322b86772fe3fdadebb587cc877efff4e61c.tar.gz
rust-820f322b86772fe3fdadebb587cc877efff4e61c.zip
add work-around for #2164
Diffstat (limited to 'tests')
-rw-r--r--tests/pass/0weak_memory_consistency.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/pass/0weak_memory_consistency.rs b/tests/pass/0weak_memory_consistency.rs
index 668635d7ff8..8b7ce50d2d4 100644
--- a/tests/pass/0weak_memory_consistency.rs
+++ b/tests/pass/0weak_memory_consistency.rs
@@ -34,10 +34,12 @@ unsafe impl<T> Sync for EvilSend<T> {}
 // multiple times
 fn static_atomic(val: i32) -> &'static AtomicI32 {
     let ret = Box::leak(Box::new(AtomicI32::new(val)));
+    ret.store(val, Relaxed); // work around https://github.com/rust-lang/miri/issues/2164
     ret
 }
 fn static_atomic_bool(val: bool) -> &'static AtomicBool {
     let ret = Box::leak(Box::new(AtomicBool::new(val)));
+    ret.store(val, Relaxed); // work around https://github.com/rust-lang/miri/issues/2164
     ret
 }