[PATCH] D38669: [sanitizer] Don't intercept signal and sigaction on Fuchsia

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 9 11:31:52 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL315227: [sanitizer] Don't intercept signal and sigaction on Fuchsia (authored by phosek).

Changed prior to commit:
  https://reviews.llvm.org/D38669?vs=118237&id=118242#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D38669

Files:
  compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
  compiler-rt/trunk/lib/ubsan/ubsan_signals_standalone.cc


Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -389,7 +389,7 @@
 #define SANITIZER_INTERCEPT_MALLOC_USABLE_SIZE (!SI_MAC)
 #define SANITIZER_INTERCEPT_MCHECK_MPROBE SI_LINUX_NOT_ANDROID
 #define SANITIZER_INTERCEPT_WCSCAT SI_POSIX
-#define SANITIZER_INTERCEPT_SIGNAL_AND_SIGACTION (!SI_WINDOWS)
+#define SANITIZER_INTERCEPT_SIGNAL_AND_SIGACTION (!SI_WINDOWS && SI_NOT_FUCHSIA)
 #define SANITIZER_INTERCEPT_BSD_SIGNAL SI_ANDROID
 
 #endif  // #ifndef SANITIZER_PLATFORM_INTERCEPTORS_H
Index: compiler-rt/trunk/lib/ubsan/ubsan_signals_standalone.cc
===================================================================
--- compiler-rt/trunk/lib/ubsan/ubsan_signals_standalone.cc
+++ compiler-rt/trunk/lib/ubsan/ubsan_signals_standalone.cc
@@ -24,6 +24,9 @@
 
 namespace __ubsan {
 
+#if SANITIZER_FUCHSIA
+void InitializeDeadlySignals() {}
+#else
 static void OnStackUnwind(const SignalContext &sig, const void *,
                           BufferedStackTrace *stack) {
   GetStackTraceWithPcBpAndContext(stack, kStackTraceMax, sig.pc, sig.bp,
@@ -44,6 +47,7 @@
   InitializeSignalInterceptors();
   InstallDeadlySignalHandlers(&UBsanOnDeadlySignal);
 }
+#endif
 
 } // namespace __ubsan
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38669.118242.patch
Type: text/x-patch
Size: 1444 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171009/8dc06024/attachment.bin>


More information about the llvm-commits mailing list