tokio-rs / loom

Concurrency permutation testing tool for Rust.
MIT License
2.14k stars 111 forks source link

Look up atomic locations in the right place #122

Closed jonhoo closed 4 years ago

jonhoo commented 4 years ago

As far as I can tell, it basically isn't possible to write a test for dc7eb04ce63791475de3167169f8ad6aa71a1c64 without undefined behavior, since with_mut requires &mut self, so you wouldn't be able to call unsync_load at the same time.

jonhoo commented 4 years ago

Do we also want a test for concurrent unsynced loads (the way that check was originally written)? I don't see how that'd be a race (it's read-read), but that was what it did...