diff options
author | Martin Storsjö <martin@martin.st> | 2021-07-07 21:06:08 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2021-07-08 12:36:03 +0300 |
commit | 715ca752ac4f8ba69fe68110823e0eabf5614bc7 (patch) | |
tree | b2d2412a169fc0f58790b1564d8de1f2345f3bff /llvm/unittests/Support/ErrorTest.cpp | |
parent | abfa950d86da1737a7dd52ba262fa39dd2e937fa (diff) | |
download | llvm-715ca752ac4f8ba69fe68110823e0eabf5614bc7.zip llvm-715ca752ac4f8ba69fe68110823e0eabf5614bc7.tar.gz llvm-715ca752ac4f8ba69fe68110823e0eabf5614bc7.tar.bz2 |
[libcxx] [test] Fix spurious failures in the thread detach test on Windows
Make sure that the detached thread has started up before exiting
the process.
If the detached thread hasn't started up at all, and the main thread
exits, global data structures in the process are torn down, which
then can cause crashes when the thread starts up late after required
mutexes have been destroyed. (In particular, the mutex used internally
in _Init_thread_header, which is used in the initialization of
__thread_local_data()::__p, can cause crashes if the main thread already
has finished and progressed far with destruction.)
Differential Revision: https://reviews.llvm.org/D105592
Diffstat (limited to 'llvm/unittests/Support/ErrorTest.cpp')
0 files changed, 0 insertions, 0 deletions