Hello, I am working on debug a mingw-w64 problem of snmalloc. https://github.com/microsoft/snmalloc/pull/217. it turns out that MinGW GCC runs no dtor at all for my example provided in the above issue list (but the process seems to quit normally).
In a later discussion, someone found that when compiling the object with LLVM compiler-rt, the dtors are invoked but then the process quit abnormally. I got some time tracing the TLS destruction procedure. It seems that those `tls_callback` and `__mingw_cxa_thread_atexit` functions are invoked currently; but there is one thing strange that `tls_dtors` appear to be optimized out in the distributed binary from MSYS2. Considering the later behavior of the callback functions, I think this `optimized-out` global variable may lead to some problems here. Indeed, when I step into `run_dtor_list`. I see GDB jump to some strange address (0x00000000000) and leave a SIGFAULT to me. However, since I do not have a powerful windows PC, I do not have the conditions to test whether it is the true problem to blame. _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
