http://bugs.winehq.org/show_bug.cgi?id=7036
--- Comment #11 from Jim Cameron jim_24601@btinternet.com 2008-08-21 17:04:06 --- I think it more likely that it was a compiler update that originally triggered this bug and not a Wine update at all. When starting the exe, __wine_kernel_init() calls wine_switch_to_stack() which in turn calls start_process() on the process' own stack. wine_switch_to_stack() is an assembly function and on i386 always calls the function passed to it with the same stack alignment (mod 16 bytes), but start_process() is written in C and uses exception handling, so it's at the mercy of the compiler.
As an experiment, I fudged the stack alignment in wine_switch_to_stack() and got the unpatched doom3.exe to run that way. Of course, that isn't a real solution because start_process() is still in between, so a compiler upgrade or change to start_process() could still break the alignment again. To fix the bug, you'd have to wrap the entry point in the Windows executable with a little piece of assembly that fudged the stack alignment to what it was expecting.