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.
addr
1 parent c268ee2 commit 68776d2Copy full SHA for 68776d2
src/shims/posix/linux/sync.rs
@@ -77,6 +77,7 @@ pub fn futex<'tcx>(
77
this.memory.check_ptr_access(addr.to_scalar()?, Size::from_bytes(4), Align::from_bytes(4).unwrap())?;
78
// Read an `i32` through the pointer, regardless of any wrapper types.
79
// It's not uncommon for `addr` to be passed as another type than `*mut i32`, such as `*const AtomicI32`.
80
+ // FIXME: this fails if `addr` is not a pointer type.
81
let futex_val = this.read_scalar_at_offset(addr.into(), 0, this.machine.layouts.i32)?.to_i32()?;
82
if val == futex_val {
83
// The value still matches, so we block the trait make it wait for FUTEX_WAKE.
0 commit comments