BTW, I think the ThreadRegistry::CreateThread() call should be moved into AsanThread::Create(). This code is duplicated across 4 uses of AsanThread::Create(), and anyway most other ThreadRegistry access is done via AsanThread (including ThreadRegistry::FinishThread()). http://reviews.llvm.org/D6441