[compiler-rt] 6f3f659 - [compiler-rt] Also consider SIGPROF as a synchronous signal (#85188)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 14 05:39:52 PDT 2024
Author: serge-sans-paille
Date: 2024-03-14T12:39:47Z
New Revision: 6f3f659ce9ab91002b4a490b0ce4b085981383cd
URL: https://github.com/llvm/llvm-project/commit/6f3f659ce9ab91002b4a490b0ce4b085981383cd
DIFF: https://github.com/llvm/llvm-project/commit/6f3f659ce9ab91002b4a490b0ce4b085981383cd.diff
LOG: [compiler-rt] Also consider SIGPROF as a synchronous signal (#85188)
Blocking that signal causes inter-blocking for profilers that monitor
threads through that signal.
Fix #83844 and #83561
Added:
Modified:
compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp b/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
index 8ffc703b05eace..2bebe651b994e5 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
@@ -126,6 +126,7 @@ const int SIGFPE = 8;
const int SIGSEGV = 11;
const int SIGPIPE = 13;
const int SIGTERM = 15;
+const int SIGPROF = 27;
#if defined(__mips__) || SANITIZER_FREEBSD || SANITIZER_APPLE || SANITIZER_NETBSD
const int SIGBUS = 10;
const int SIGSYS = 12;
@@ -2168,7 +2169,8 @@ static bool is_sync_signal(ThreadSignalContext *sctx, int sig,
return false;
#endif
return sig == SIGSEGV || sig == SIGBUS || sig == SIGILL || sig == SIGTRAP ||
- sig == SIGABRT || sig == SIGFPE || sig == SIGPIPE || sig == SIGSYS;
+ sig == SIGABRT || sig == SIGFPE || sig == SIGPIPE || sig == SIGSYS ||
+ sig == SIGPROF;
}
void sighandler(int sig, __sanitizer_siginfo *info, void *ctx) {
More information about the llvm-commits
mailing list