From: dw <lim...@ya...> - 2013-12-05 22:30:58
|
A few thoughts: 1) Shouldn't global_lock be __LONG32? 2) Would it make sense for the exchange on global_lock to be done as a single operation (ie InterlockedCompareExchange)? dw On 12/5/2013 10:45 AM, Fanael Linithien wrote: > I came up with a patch that fixes the issue for me. > > The patch replaces the global critical section with a spinlock. > Critical sections require explicit initialization before use, which in > this case is not possible: register_frame_ctor (from libgcc), which > runs BEFORE enter_global_cs, tries to lock a mutex, which requires a > spinlock, which needs to be initialized in static_spin_init, which > tries to enter the global critical section, which is not initialized. > The result is a segfault somewhere in ntdll. > > register_frame_ctor has constructor priority of 0, so setting the > priority of global_spin_ctor wouldn't cut it. > > > I'm not sure what is the official way to send patches, so I'm posting it here. > > > ------------------------------------------------------------------------------ > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > > > _______________________________________________ > Mingw-w64-public mailing list > Min...@li... > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public |