[PATCH] D20577: [esan|wset] Intercept and chain signal handlers

Mike Aizatsky via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 14:28:09 PDT 2016


aizatsky added inline comments.

================
Comment at: lib/esan/working_set_posix.cpp:38
@@ +37,3 @@
+    AppSigAct.sigaction = (void (*)(int, void*, void*))Handler;
+    return false; /* skip */
+  }
----------------
s/skip/skip real/

================
Comment at: lib/esan/working_set_posix.cpp:53
@@ +52,3 @@
+      internal_memcpy(&AppSigAct, Act, sizeof(AppSigAct));
+    return false; /* skip */
+  }
----------------
ditto

================
Comment at: lib/esan/working_set_posix.cpp:99
@@ +98,3 @@
+  SigAct.sa_flags = SA_SIGINFO | SA_NODEFER;
+  int Res = internal_sigaction(SIGSEGV, &SigAct, &AppSigAct);
+  CHECK(Res == 0);
----------------
Could a signal happen before this? AppSigAct would be uninitialized in process* functions.

================
Comment at: test/esan/TestCases/workingset-fault.cpp:1
@@ +1,2 @@
+// RUN: %clang_esan_wset -O0 %s -o %t 2>&1
+// RUN: %run %t 2>&1 | FileCheck %s
----------------
This test as it is doesn't test faults, but tests signal handling propagation, right? Maybe rename it?

(Optionally include "posix" in the name?)


http://reviews.llvm.org/D20577





More information about the llvm-commits mailing list