[PATCH] D20751: [esan] Add sideline itimer support

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 2 13:47:04 PDT 2016


vitalybuka accepted this revision.
vitalybuka added a reviewer: vitalybuka.
vitalybuka added a comment.
This revision is now accepted and ready to land.

LGTM with nits


================
Comment at: lib/esan/esan_sideline_linux.cpp:44
@@ +43,3 @@
+  VPrintf(3, "Sideline signal %d\n", SigNum);
+  if (SigNum == SIGALRM) {
+    // See above about needing TLS to avoid this global var.
----------------
CHECK_EQ(SigNum, SIGALRM) here
and remove if() and unreachable below



================
Comment at: lib/esan/esan_sideline_linux.cpp:61
@@ +60,3 @@
+  int Res = internal_sigaction(SigNum, &SigAct, nullptr);
+  CHECK(Res == 0);
+}
----------------
 CHECK_EQ here and below

================
Comment at: lib/esan/esan_sideline_linux.cpp:73
@@ +72,3 @@
+  InternalScopedBuffer<char> StackMap(SigAltStackSize);
+  struct sigaltstack SigAltStack;
+  internal_memset(&SigAltStack, 0, sizeof(SigAltStack));
----------------
SigAltStack = {} and no need memset

================
Comment at: lib/esan/esan_sideline_linux.cpp:88
@@ +87,3 @@
+
+  if (!Thread->adjustTimer(Thread->Freq)) {
+    Printf("FATAL: EfficiencySanitizer failed to set up itimer\n");
----------------
just CHECK(Thread->adjustTimer(Thread->Freq))  ?


http://reviews.llvm.org/D20751





More information about the llvm-commits mailing list