0a8fbe6d06efe269b6a66344c9ef48069c822a31
Some codes that use TLS fail intermittently because one thread tries to write TLS values after the TLS key has been destroyed by another thread. This happens when one thread executes library shutdown (and destroys TLS keys), while another thread starts to execute the TLS key destructor routine. Before this change, the kmp_init_runtime flag was checked before calling pthread_* TLS functions, but this flag is set to FALSE later than the destruction of the TLS keys, which leads to failure. The fix is to check kmp_init_gtid instead, as this flag is unset *before* the destruction of TLS keys. Differential Revision: http://reviews.llvm.org/D19022 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@266674 91177308-0d34-0410-b5e6-96231b3b80d8
Description
No description provided
11 MiB
Languages
C++
68.3%
C
19%
Perl
3.8%
Cuda
3.2%
CMake
3.1%
Other
2.5%