Skip to content

Commit da8180f

Browse files
[compiler-rt] Also consider SIGPROF as a synchronous signal
Blocking that signal causes inter-blocking for profilers that monitor threads through that signal. Fix #83844 and #83561
1 parent 071f72a commit da8180f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ const int SIGFPE = 8;
126126
const int SIGSEGV = 11;
127127
const int SIGPIPE = 13;
128128
const int SIGTERM = 15;
129+
const int SIGPROF = 27;
129130
#if defined(__mips__) || SANITIZER_FREEBSD || SANITIZER_APPLE || SANITIZER_NETBSD
130131
const int SIGBUS = 10;
131132
const int SIGSYS = 12;
@@ -2168,7 +2169,8 @@ static bool is_sync_signal(ThreadSignalContext *sctx, int sig,
21682169
return false;
21692170
#endif
21702171
return sig == SIGSEGV || sig == SIGBUS || sig == SIGILL || sig == SIGTRAP ||
2171-
sig == SIGABRT || sig == SIGFPE || sig == SIGPIPE || sig == SIGSYS;
2172+
sig == SIGABRT || sig == SIGFPE || sig == SIGPIPE || sig == SIGSYS ||
2173+
sig == SIGPROF;
21722174
}
21732175

21742176
void sighandler(int sig, __sanitizer_siginfo *info, void *ctx) {

0 commit comments

Comments
 (0)