-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ThreadSanitizer reports data race in AtomicCell::compare_exchange if it is not lock-free #644
Comments
Seems this only happens if The crossbeam/crossbeam-channel/src/flavors/tick.rs Lines 19 to 20 in 99c66ec
However, RUSTFLAGS="-Z sanitizer=thread --cfg crossbeam_sanitize" \
cargo test -Z build-std --release --target x86_64-apple-darwin -p crossbeam-channel --test tick -- --test-threads=1 |
Non-lock-free |
That's true. ...So I think we can close this. |
@tomtomjhj do you happen to have enhanced tsan to support those fences? |
@jeehoonkang I guess you're talking about loom. I'll send a PR to loom later and cc you. BTW it's about a simple implementation of Release/SeqCst fence, the correctness of which is unclear yet. |
|
@cynecx Loom had |
Run the following command:
ThreadSanitizer reports data race:
output
Found in #591 (https://github.com/crossbeam-rs/crossbeam/runs/1647950214?check_suite_focus=true)
The text was updated successfully, but these errors were encountered: