[PATCH] [asan] Improve thread lifetime tracking on POSIX systems.
Alexey Samsonov
samsonov at google.com
Mon Oct 14 04:22:41 PDT 2013
================
Comment at: lib/asan/asan_thread.cc:173
@@ +172,3 @@
+ // the TSD destructors have run might cause false positives in LSan.
+ if (!SANITIZER_POSIX)
+ this->Destroy();
----------------
Kostya Serebryany wrote:
> I don't like this 'if'. What will happen on Windos? Won't PlatformTSDDtor be called?
It won't be called on Windows:
void AsanTSDInit(void (*destructor)(void *tsd)) {
// FIXME: we're ignoring the destructor for now.
tsd_key_inited = true;
}
It shouldn't break in a bad way if PlatformTSDDtor will be called on Windows: if thread is already destroyed, AsanThread::Destroy() is a no-op.
http://llvm-reviews.chandlerc.com/D1896
More information about the llvm-commits
mailing list