[PATCH] [asan] Improve thread lifetime tracking on POSIX systems.

Alexey Samsonov samsonov at google.com
Fri Oct 11 07:59:51 PDT 2013


  I'm OK with this change, but let's wait for Kostya's opinion as well.


================
Comment at: lib/asan/asan_thread.cc:168
@@ -167,1 +167,3 @@
 
+#if !SANITIZER_POSIX
+  // On POSIX systems the TSD destructor will take care of this later on. Doing
----------------
I prefer
  if (!SANITIZER_POSIX)

Elaborate whan "unhappy" means (thread will be treated as dead too early, so we'll fail to see live memory from this thread while it's still running TSD destructors).

================
Comment at: lib/asan/asan_thread.h:133
@@ -129,1 +132,3 @@
 
+void PlatformTSDDtor(void *tsd);
+
----------------
Consider moving this to asan_internal.h next to other TSD-related functions.


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



More information about the llvm-commits mailing list