Skip to content
Commit f503d51e authored by Kuba Brecka's avatar Kuba Brecka
Browse files

[tsan] For OS X thread finalization, remove g_thread_finalize_key in favor of libpthread hooks

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.

Differential Revision: http://reviews.llvm.org/D14777

llvm-svn: 253560
parent 9eb6df9f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment