-
Notifications
You must be signed in to change notification settings - Fork 13.4k
ThreadSanitizer detects a data race in the test runner (rustc --test
)
#39608
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Like with #39610 I'd be tempted to say these are false positives, but these stack traces don't look so familiar so I'm not certain of that |
This will be a false positive because drop_slow uses a fence, and tsan doesn't work with fences. |
So I take it this isn't actually a problem since we're just using a fence and tsan doesn't support that? Should we close? |
Can the false-positive be worked-around by manually annotating the happens-before relationship? See https://stackoverflow.com/questions/37552866/why-does-threadsanitizer-report-a-race-with-this-lock-free-example. |
Well, maybe if we could conditionally build without the fence (rework to use a load/store instead) when tsan is enabled then the error wouldn't be seen. |
Make std::sync::Arc compatible with ThreadSanitizer The memory fences used previously in Arc implementation are not properly understood by thread sanitizer as synchronization primitives. This had unfortunate effect where running any non-trivial program compiled with `-Z sanitizer=thread` would result in numerous false positives. Replace acquire fences with acquire loads to address the issue. Fixes rust-lang#39608.
Make std::sync::Arc compatible with ThreadSanitizer The memory fences used previously in Arc implementation are not properly understood by thread sanitizer as synchronization primitives. This had unfortunate effect where running any non-trivial program compiled with `-Z sanitizer=thread` would result in numerous false positives. Replace acquire fences with acquire loads to address the issue. Fixes rust-lang#39608.
Make std::sync::Arc compatible with ThreadSanitizer The memory fences used previously in Arc implementation are not properly understood by thread sanitizer as synchronization primitives. This had unfortunate effect where running any non-trivial program compiled with `-Z sanitizer=thread` would result in numerous false positives. Replace acquire fences with acquire loads to address the issue. Fixes rust-lang#39608.
Uh oh!
There was an error while loading. Please reload this page.
iff the crate contains two or more unit tests.
STR
Meta
TODO Sanitizers are not yet in tree. (cf. #38699)
cc @alexcrichton @brson
The text was updated successfully, but these errors were encountered: