aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJakob Widauer <jakob.widauer@gmail.com>2025-05-22 18:44:53 +0200
committerGitHub <noreply@github.com>2025-05-22 09:44:53 -0700
commit1aa746d300d72042aaa48e7982f76a823aed8cb3 (patch)
tree2000d599e0d8489ad65a3655a90e240ade2933f2 /clang/lib/Frontend/CompilerInvocation.cpp
parent111ac6987642e9ff1b8ae18ab6e573e0cd3b7129 (diff)
downloadllvm-1aa746d300d72042aaa48e7982f76a823aed8cb3.zip
llvm-1aa746d300d72042aaa48e7982f76a823aed8cb3.tar.gz
llvm-1aa746d300d72042aaa48e7982f76a823aed8cb3.tar.bz2
[tsan] Fix nested signal handling (#138599)
This PR fixes the bug reported in #134358. In the current implementation of the tsan posix interceptors, the signal set does not get restored to the correct original set, if a signal handler gets called, while already inside of a signal handler. This leads to the wrong signal set being set for the thread in which the signal handler was called. To fix this I introduced a stack of `__sanitizer_sigset_t` to keep all the correct old signal sets and restore them in the correct order. There was also already an existing test that tested nested / recursive signal handlers, but it was disabled. I therefore reenabled it, made it more robust by waiting for the second thread to have been properly started and added checks for the signal sets. This test then failed before the introduction of the interceptor fix and didn't fail with the fix. @dvyukov What are your thoughts?
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions