[compiler-rt] [ubsan] Support static linking with standalone runtime (PR #80943)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 13 16:02:18 PST 2024
================
@@ -66,6 +66,11 @@ void InitializeDeadlySignals() {
return;
is_initialized = true;
InitializeSignalInterceptors();
+#if SANITIZER_INTERCEPT_SIGNAL_AND_SIGACTION
+ // REAL(sigaction_symname) is nullptr in a static link. Bail out.
+ if (!REAL(sigaction_symname))
----------------
vitalybuka wrote:
Actually signal interceptors are there :(
I think the best for `-static` is to avoid code
```
#define SIGNAL_INTERCEPTOR_ENTER() __ubsan::InitializeDeadlySignals()
#include "sanitizer_common/sanitizer_signal_interceptors.inc"
```
maybe in any UBSAN
`InitializeSignalInterceptors` is only needed to enforce options like `handle_segv=2`
which are not very critical
https://github.com/llvm/llvm-project/pull/80943
More information about the llvm-commits
mailing list