[PATCH] tsan: fix signal handling during stop-the-world

Sergey Matveev earthdok at google.com
Thu Mar 5 07:10:21 PST 2015


Still kinda wary about this approach, but let's give it a try. LGTM


================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld.h:63
@@ -63,1 +62,3 @@
+// The callback should not call any libc functions. The callback must not call
+// exit nor _exit and instead return to the caller.
 // This function should NOT be called from multiple threads simultaneously.
----------------
nit: could you please be consistent in "function" vs "function()" in comments

================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:424
@@ +423,3 @@
+    // NOTE: errno is shared between this thread and the tracer thread.
+    // internal_waitpid may call syscall() which can access/spoil errno,
+    // so we can't call it now. Instead we for the tracer thread to finish using
----------------
same

http://reviews.llvm.org/D8032

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list