On Sun, 7 Apr 2019, Andrew Ng wrote:
Hi,
I have taken a look at issue https://sourceforge.net/p/mingw-w64/bugs/597,
which I recently ran into again (had hoped it would have been fixed by now).
I have attached a patch with a proposed fix to the MinGW-w64 winpthreads. I
have been running this patch for a little while now and it appears to fix
the main LLD issue.
There are still dead locks when running the LLD test suite because this
does a "full" vs the default "quick" exit from LLD. I believe that the
fix for these dead locks really require changes to LLD/LLVM.
There's at least one known issue in LLD/LLVM, relating to thread cleanup.
When LLD is closing down, it tries to shortcut some cleanup by doing a
minimal cleanup but then invoking _exit(), which shouldn't run global
destructors. If the LLVM core libraries are built as a separate DLL, the
global destructors of those DLLs are run despite the fact that _exit() was
used to terminate the process.
See https://reviews.llvm.org/D53968 for discussion on this, the comment in
https://reviews.llvm.org/D53968#1285287 is probably the most concise
explanation of the issue.
// Martin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public