[libc++] Fix PR22606 - Leak pthread_key with static storage duration to ensure...
[libc++] Fix PR22606 - Leak pthread_key with static storage duration to ensure all of thread-local destructors are called. Summary: See https://llvm.org/bugs/show_bug.cgi?id=22606 for more discussion. Most of the changes in this patch are file reorganization to help ensure assumptions about how __thread_specific_pointer is used hold. The assumptions are: * `__thread_specific_ptr<Tp>` is only created with a `__thread_struct` pointer. * `__thread_specific_ptr<Tp>` can only be constructed inside the `__thread_local_data()` function. I'll remove the comments before committing. They are there for clarity during review. Reviewers: earthdok, mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D8802 llvm-svn: 245334
Loading
Please sign in to comment