[PATCH] Run the callback on a separate stack in StopTheWorld.

Alexey Samsonov samsonov at google.com
Mon Apr 1 01:45:29 PDT 2013


  These are just nits. If glider@ says ok, we can commit this for you today.


================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld_linux.cc:74
@@ -73,1 +73,3 @@
 namespace __sanitizer {
+static const uptr kTracerStackSize = 2 * 1024 * 1024;
+
----------------
Please move this to the place of its usage. This doesn't have to be a global constant

================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld_linux.cc:82
@@ +81,3 @@
+// in LSan. To fix this we provide a wrapper that cleans up after itself.
+int TidySigaction(int signum, const struct sigaction *act,
+                  struct sigaction *oldact) {
----------------
static

================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld_linux.cc:276
@@ +275,3 @@
+    // Omitting MAP_STACK here works in current kernels but might break later.
+    guard_start_ = (uptr) MmapOrDie(stack_size_ + guard_size_,
+                                   "ScopedStackWithGuard");
----------------
(uptr)MmapOrDir (w/o space) for consistency

================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld_linux.cc:88
@@ +87,3 @@
+    // The rest of sa_mask is unused.
+    internal_memset((void *)((uptr)&oldact->sa_mask + 8), 0,
+                    sizeof(oldact->sa_mask) - 8);
----------------
make "8" a named constant.


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



More information about the llvm-commits mailing list