[all-commits] [llvm/llvm-project] 715ca7: [libcxx] [test] Fix spurious failures in the threa...
Martin Storsjö via All-commits
all-commits at lists.llvm.org
Thu Jul 8 02:37:27 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 715ca752ac4f8ba69fe68110823e0eabf5614bc7
https://github.com/llvm/llvm-project/commit/715ca752ac4f8ba69fe68110823e0eabf5614bc7
Author: Martin Storsjö <martin at martin.st>
Date: 2021-07-08 (Thu, 08 Jul 2021)
Changed paths:
M libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/detach.pass.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list