Skip to content
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

Usage of atomic_thread_fence in shared_ptr.h can cause false-positives w/ TSAN #543

Open
romasandu-gaijin opened this issue Sep 25, 2024 · 0 comments

Comments

@romasandu-gaijin
Copy link

Thread sanitizer does not work with atomic_thread_fences and unlikely ever will. Every usage of atomic_thread_fence must be guarded by an #if !TSAN or a similar construction for correctness of synchronization to be verifiable via TSAN.

This also breaks TSAN compilation with latest GCC, as it now warns about usage of fences when TSAN is enabled (and rightly so!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant