[PATCH] [sanitizer] Handle Die() in StopTheWorld.

Kostya Serebryany kcc at google.com
Mon Aug 26 04:35:50 PDT 2013



================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:194
@@ -193,1 +193,3 @@
 
+DieCallbackType old_die_callback;
+
----------------
static? 

================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:208
@@ -204,1 +207,3 @@
 
+void DieCallback() {
+  // This really only works correctly if all the threads are suspended at this
----------------
static void ThreadSuspenderDieCallback() ? 

================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:232
@@ +231,3 @@
+  old_die_callback = GetDieCallback();
+  SetDieCallback(DieCallback);
+
----------------
What if some later change adds a return statement here? 
Maybe replace the callback using a scoped object trick? 


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



More information about the llvm-commits mailing list