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

Add SANITIZER_CDECL to __tsan_check_no_mutexes_held #71471

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

barcharcraz
Copy link
Contributor

in #69625 @strega-nil added cdecl to a huge number of sanitizer interface declarations. It looks like she was racing against @kennyyu adding a tsan interface function. I noticed this when merging in the latest changes from llvm/main and corrected it.

@barcharcraz barcharcraz merged commit 16a395b into llvm:main Nov 7, 2023
4 checks passed
kennyyu added a commit to kennyyu/llvm-project that referenced this pull request Nov 7, 2023
This adds a new helper that can be called from application code to ensure that no mutexes are held on specific code paths. This is useful for multiple scenarios, including ensuring no locks are held:

- at thread exit
- in peformance-critical code
- when a coroutine is suspended (can cause deadlocks)

See this discourse thread for more discussion:
https://discourse.llvm.org/t/add-threadsanitizer-check-to-prevent-coroutine-suspending-while-holding-a-lock-potential-deadlock/74051

This resubmits and fixes llvm#69372 (was reverted because of build breakage).
This also includes the followup change llvm#71471 (to fix a land race).
dvyukov pushed a commit that referenced this pull request Nov 8, 2023
This adds a new helper that can be called from application code to
ensure that no mutexes are held on specific code paths. This is useful
for multiple scenarios, including ensuring no locks are held:

- at thread exit
- in peformance-critical code
- when a coroutine is suspended (can cause deadlocks)

See this discourse thread for more discussion:

https://discourse.llvm.org/t/add-threadsanitizer-check-to-prevent-coroutine-suspending-while-holding-a-lock-potential-deadlock/74051

This resubmits and fixes #69372 (was reverted because of build
breakage).
This also includes the followup change #71471 (to fix a land race).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants