On OS X, the thread finalization is fragile due to thread-local variables destruction order. I've seen cases where the we destroy the ThreadState too early and subsequent thread-local values' destructors call interceptors again. Let's replace the TLV-based thread finalization method with libpthread hooks. The notification PTHREAD_INTROSPECTION_THREAD_TERMINATE is called *after* all TLVs have been destroyed.
Details
Details
- Reviewers
kcc glider dvyukov samsonov - Commits
- rGf503d51e5bac: [tsan] For OS X thread finalization, remove g_thread_finalize_key in favor of…
rCRT253560: [tsan] For OS X thread finalization, remove g_thread_finalize_key in favor of…
rL253560: [tsan] For OS X thread finalization, remove g_thread_finalize_key in favor of…
Diff Detail
Diff Detail
- Repository
- rL LLVM