On Fri, 3 Jul 2026, LIU Hao wrote:
在 2026-7-3 03:28, Martin Storsjö 写道:
On Wed, 1 Jul 2026, LIU Hao wrote:
Thanks, I think this patch seems ok.
Thanks, pushed now, with the commit message amended a little.
Actually, I think this needs to be reverted, at least parts of it.
This causes atexit/global destructors to not be called in regular DLLs
(that are linked into the main process EXE) on regular exit (exiting from
main, etc).
This causes a couple of test failures in the compiler-rt asan testsuite:
https://github.com/mstorsjo/llvm-mingw/actions/runs/28691998891/job/85114629007
Some of the failures there are from the asan DLL itself, some come from
the LLVM tools themselves. In my builds, I build one large shared
libLLVM-<version>.dll, and all the tools link against that (and are fairly
small exes). This change caused libLLVM-<version>.dll to no longer run
destructors/atexit when the tools exits. This is the cause of one of the
test failures in the compiler-rt test run above.
So please reconsider this change.
Even if the process is in an indeterminate state at this point, I think
it's less surprising to run the destructors/atexit functions, than to
silently skip them - this has been the defacto behaviour so far.
Additionally, MSVC also runs destructors in linked DLLs on process exit.
// Martin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public