rust/tests
bors c4dd3f4ef9 Auto merge of #2228 - cbeuw:futex-fix, r=RalfJung
Prevent futex_wait from actually waiting if a concurrent waker was executed before us

Fixes #2223

Two SC fences were placed in `futex_wake` (after the caller has changed `addr`), and in `futex_wait` (before we read `addr`). This guarantees that `futex_wait` sees the value written to `addr` before the last `futex_wake` call, should one exists, and avoid going into sleep with no one else to wake us up.
ada7b72a87/src/concurrency/weak_memory.rs (L324-L326)

Earlier I proposed to use `fetch_add(0)` to read the latest value in MO, though this isn't the proper way to do it and breaks aliasing: syscall caller may pass in a `*const` from a `&` and Miri complains about write to a `SharedReadOnly` location, causing this test to fail.
ada7b72a87/tests/pass/concurrency/linux-futex.rs (L56-L68)
2022-06-18 15:10:56 +00:00
..
fail rustup 2022-06-16 11:18:09 -07:00
panic rename test suite directories 2022-06-01 10:53:38 -04:00
pass Auto merge of #2228 - cbeuw:futex-fix, r=RalfJung 2022-06-18 15:10:56 +00:00
compiletest.rs Auto merge of #2179 - RalfJung:rustc, r=oli-obk 2022-06-13 13:13:29 +00:00