[compiler-rt] [compiler-rt] Also consider SIGPROF as a synchronous signal (PR #85188)

via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 23:50:36 PDT 2024


https://github.com/serge-sans-paille created https://github.com/llvm/llvm-project/pull/85188

Blocking that signal causes inter-blocking for profilers that monitor threads through that signal.
Fix #83844 and #83561

>From 028e755ce29c7777e0ae2d725c7d56f2552d2029 Mon Sep 17 00:00:00 2001
From: serge-sans-paille <sguelton at mozilla.com>
Date: Thu, 14 Mar 2024 07:41:46 +0100
Subject: [PATCH] [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
---
 compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp b/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
index 8ffc703b05eace..80dda58aacbf2d 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
@@ -2168,7 +2168,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