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

[TSAN] Lack of Documentation for __tsan_acquire and __tsan_release Annotations #1822

Open
alvarillo89 opened this issue Nov 22, 2024 · 0 comments

Comments

@alvarillo89
Copy link

Dear Maintainers,

We have observed that Thread Sanitizer (TSan) is unable to detect when a variable is protected by a standalone memory barrier. As a result, it is necessary to annotate the memory addresses with __tsan_acquire and/or __tsan_release.

However, we have encountered instances where these annotations do not suffice to eliminate already fixed data races. Unfortunately, these annotations are not documented, and we could only find a brief comment in the code:

// __tsan_release establishes a happens-before relation with a preceding
// __tsan_acquire on the same address.
void SANITIZER_CDECL __tsan_acquire(void *addr);
void SANITIZER_CDECL __tsan_release(void *addr);

Could you please provide an official explanation and/or document their usage in the official documentation? This would be extremely helpful for developers relying on TSan.

Thank you for your attention to this matter.

Best regards,
Alvaro

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