Skip to content

Commit 0961e44

Browse files
committed
use acquire ordering for reading the futex value on macOS
1 parent dfa8d2f commit 0961e44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shims/unix/macos/sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
140140

141141
let layout = this.machine.layouts.uint(Size::from_bytes(size)).unwrap();
142142
let futex_val = this
143-
.read_scalar_atomic(&this.ptr_to_mplace(ptr, layout), AtomicReadOrd::Relaxed)?
143+
.read_scalar_atomic(&this.ptr_to_mplace(ptr, layout), AtomicReadOrd::Acquire)?
144144
.to_bits(Size::from_bytes(size))?;
145145

146146
let Some(futex) = this.get_sync_or_init(ptr, |_| {

0 commit comments

Comments
 (0)