Closed
Description
Let's consider the following testcase:
- We have two pipes, A and B, and some global
static mut S
- The main thead sets up an epoll for both of these pipes' read ends
- We spawn a sub-thread that writes to pipe A, then mutates
S
, then writes to pipe B - The main thread yields, and we have
miri-preemption-rate=0
, so this will fully run the sub-thread - The main thread waits on both pipes with epoll, but only wants to receive a single event
- The main thread asserts that it was informed about pipe A, not B
- Then the main thread reads from
S
This should report UB due to a data race.
However, I think what will happen here is that the main thread will receive the notification for pipe A, but because we call acquire_clock
on the ready_list.clock
, we acquire the clock for all events. This means we miss the UB as the main thread read of S
seems to happen-after the sub-thread write of S
.
Metadata
Metadata
Assignees
Labels
No labels