On Thu, 5 Dec 2024, Martin Storsjö wrote: > When the destructors of the TLS objects are executed via > mingw-w64-crt's __cxa_thread_atexit, those destructors are executed > via a TLS callback, after the point when emutls has deallocated > their storage memory.
> Unfortunately, this isn't enough to fix all cases of this issue. > This patch fixes the case when winpthreads is statically linked > into the same executable as the user code destructors. If they > reside in a separate DLL, the winpthreads TLS callback executes > before the main executable TLS callbacks, so the emutls memory still > is freed before running the destructors. Oh, this again ;). I fought with this for a while back in 2020, but never did figure out how to fix it. Other old discussions: https://github.com/msys2/MINGW-packages/issues/2519 https://github.com/msys2/MINGW-packages/issues/7096 _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public