[PATCH] Move the signal handling logic into sanitizer_common

Evgeniy Stepanov eugenis at google.com
Fri Jan 24 03:46:28 PST 2014



================
Comment at: msan/msan.h:57
@@ +56,3 @@
+void MSAN_OnSIGSEGV(int, void *siginfo, void *context);
+int msan_sigaction_interceptor(int signo,
+                               const __sanitizer_sigaction *act,
----------------
Did you mean msan_sigaction_callback?

================
Comment at: msan/msan.cc:24
@@ -23,1 +23,3 @@
 
+#include <signal.h>
+
----------------
why this include?

================
Comment at: sanitizer_common/sanitizer_common.h:216
@@ -211,1 +215,3 @@
 DieCallbackType GetDieCallback();
+typedef __sanitizer_sighandler_t(*SignalFunctionCallbackType)(
+    int, __sanitizer_sighandler_t);
----------------
space before (*

================
Comment at: sanitizer_common/sanitizer_linux.cc:506
@@ +505,3 @@
+bool IsDeadlySignal(int signum) {
+  return (signum == SIGSEGV) && common_flags()->handle_segv;
+}
----------------
Why are we not catching sigbus, sigill, etc here? What's the difference from sigsegv?


http://llvm-reviews.chandlerc.com/D2605



More information about the llvm-commits mailing list