Closed
Description
It seems that crossbeam_deque
knowingly executes data races for work stealing and tries to make it safe by performing volatile reads/writes and wrapping the returned type in MaybeUninit<T>
. Other code is responsible for checking whether the operation raced and thus whether to assume that the MaybeUninit<T>
is a valid value.
There are some referenced papers behind the implementation, but I'm not sure how this could be sound under Rust's rules for loads and stores.
Am I missing something? It seems like the project runs tests under miri which I would have expected to highlight this issue, but maybe miri's execution model makes it hard to detect these kinds of races?
Metadata
Metadata
Assignees
Labels
No labels