http://bugs.winehq.org/show_bug.cgi?id=58755
Zeb Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #8 from Zeb Figura z.figura12@gmail.com --- I actually ended up partially debugging this. The problem is that Wine sometimes does WCB16_REGS calls with a zeroed context, so it sets zero %fs and %gs. Some CPUs crash when %gs is zero even in 64-bit mode, mine included.
With debugging, this happens at the second instruction of the unix call dispatcher, which loads from %gs. Without debugging, it still crashes, this time in the process of trying to call NtSetLdtEntries() called from InitTask(). On my machine it doesn't actually crash in the syscall dispatcher, but rather when loading the TEB in free_temp_data() called from Wow64SystemServiceEx(), which my compiler for some reason decides to do before calling wow64_syscall(). The effect is the same.
What's confusing is that we shouldn't have a cleared %gs in 32-bit code, because we save and restore the 32-bit %gs when calling into and out of 16-bit code. I'm not sure what's going wrong with that mechanism.