[compiler-rt] [sanitizer] Add cloak_sanitizer_signal_handlers runtime option (PR #162746)

Thurston Dang via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 10 12:45:16 PDT 2025


================
@@ -35,17 +37,22 @@ using namespace __sanitizer;
         Printf(                                                               \
             "Warning: REAL(sigaction_symname) == nullptr. This may happen "   \
             "if you link with ubsan statically. Sigaction will not work.\n"); \
-        return -1;                                                            \
+        ret = -1;                                                             \
+      } else {                                                                \
+        ret = REAL(sigaction_symname)(signum, act, oldact);                   \
----------------
thurstond wrote:

It is necessary: the interceptor calls this macro and then we want to do more stuff (e.g., change the return value); if the macro returns immediately, we can't do the followup steps.

I can split it into a separate NFC though?

https://github.com/llvm/llvm-project/pull/162746


More information about the llvm-commits mailing list