Created attachment 331006 [details, diff] patch found on mingw mailing list files generated by i686-mingw32 4.72 crash at start. "The crash occurs in __dyn_tls_init (tlssup.c). I found it by setting a breakpoint in __mingw_CRTStartup() and executing the startup code (compiled with optimizations) line by line. " see http://mingw.5.n7.nabble.com/Re-Mingw-users-MinGW-GCC-4-7-0-released-td26323.html#a34089555 i can't verify if the patch works, will report back if it does.
sadly it seems to not work...
backtrace of such a program: Program received signal SIGSEGV, Segmentation fault. 0x011a3019 in _tls_start () (gdb) bt #0 0x011a3019 in _tls_start () #1 0x00829b1e in __dyn_tls_init@12 () #2 0x00401026 in __mingw_CRTStartup () #3 0x75292811 in msvcrt!__setlc_active () from C:\Windows\syswow64\msvcrt.dll #4 0x77ae9ef2 in ntdll!RtlpNtSetValueKey () from C:\Windows\system32\ntdll.dll #5 0xfffde000 in ?? () #6 0x77ae9ec5 in ntdll!RtlpNtSetValueKey () from C:\Windows\system32\ntdll.dll #7 0x004012a0 in mainCRTStartup () #8 0xfffde000 in ?? () #9 0x00000000 in ?? ()
note, the patch is for mingwrt-3.20-mingw32
upstream there seems to be already a fix for that: http://sourceforge.net/projects/mingw/files/MinGW/Base/mingw-rt/mingwrt-3.20/ -> mingwrt-3.20-2-mingw32-src.tar.lzma release notes: http://mingw.5.n7.nabble.com/Updated-mingwrt-3-20-2-td22942.html will try out & report back...
after recompiling gcc/binutils/... it seems to work with the updated mingwrt-3.20-2-mingw32-src.tar.lzma! (can't say what exactly needs to be recompiled...)
*** This bug has been marked as a duplicate of bug 436482 ***