aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorNazım Can Altınova <canaltinova@gmail.com>2024-03-26 12:32:52 +0100
committerGitHub <noreply@github.com>2024-03-26 12:32:52 +0100
commitf01377d8ebcb1f52fe75a236cdf34f1b8b1e99fb (patch)
treecc2d7fe3d9e61f63c5181c1d05e9976719f839c1 /clang/lib/CodeGen/CodeGenModule.cpp
parent5b544b511c7133fcb26a5c563b746a4baefb38d6 (diff)
downloadllvm-f01377d8ebcb1f52fe75a236cdf34f1b8b1e99fb.zip
llvm-f01377d8ebcb1f52fe75a236cdf34f1b8b1e99fb.tar.gz
llvm-f01377d8ebcb1f52fe75a236cdf34f1b8b1e99fb.tar.bz2
[tsan] Mark `pthread_*_lock` functions as blocking (#84162)
Fixes #83561. When a thread is blocked on a mutex and we send an async signal to that mutex, it never arrives because tsan thinks that `pthread_mutex_lock` is not a blocking function. This patch marks `pthread_*_lock` functions as blocking so we can successfully deliver async signals like `SIGPROF` when the thread is blocked on them. See the issue also for more details. I also added a test, which is a simplified version of the compiler explorer example I posted in the issue. Please let me know if you have any other ideas or things to improve! Happy to work on them. Also I filed #83844 which is more tricky because we don't have a libc wrapper for `SYS_futex`. I'm not sure how to intercept this yet. Please let me know if you have ideas on that as well. Thanks!
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions