[PATCH] D38669: [sanitizer] Don't intercept signal and sigaction on Fuchsia
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 9 10:06:37 PDT 2017
vitalybuka added inline comments.
================
Comment at: lib/ubsan/ubsan_signals_standalone.cc:27
+#if !SANITIZER_FUCHSIA
static void OnStackUnwind(const SignalContext &sig, const void *,
----------------
Could you please either create _fuchsia.cc file or
consolidate code into single #if
e.g.:
```
#if SANITIZER_FUCHSIA
void InitializeDeadlySignals() {}
#else
static void OnStackUnwind(const SignalContext &sig, const void *,
BufferedStackTrace *stack) {
...
}
static void UBsanOnDeadlySignal(int signo, void *siginfo, void *context) {
...
}
static bool is_initialized = false;
void InitializeDeadlySignals() {
if (is_initialized)
return;
is_initialized = true;
InitializeSignalInterceptors();
InstallDeadlySignalHandlers(&UBsanOnDeadlySignal);
}
#endif
```
https://reviews.llvm.org/D38669
More information about the llvm-commits
mailing list