[PATCH] [ASan, LSan] Improve tracking of thread creation.

Alexey Samsonov vonosmas at gmail.com
Thu Dec 4 13:16:27 PST 2014


I'd appreciate a comment describing a motivation, in AsanThread::ThreadStart decl and/or in pthread_create() interceptor. Thanks!

================
Comment at: lib/asan/asan_interceptors.cc:175
@@ +174,3 @@
+  ThreadStartParam *param = reinterpret_cast<ThreadStartParam *>(arg);
+  AsanThread *t = 0;
+  while ((t = reinterpret_cast<AsanThread *>(
----------------
nullptr

================
Comment at: lib/asan/asan_rtl.cc:684
@@ -684,1 +683,3 @@
+  main_thread->ThreadStart(internal_getpid(),
+                           /* signal_thread_is_registered */ 0);
   force_interface_symbols();  // no-op.
----------------
nullptr

http://reviews.llvm.org/D6441






More information about the llvm-commits mailing list