[Bug 7036] Doom 3 Demo fails to start

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Aug 21 17:04:08 CDT 2008


http://bugs.winehq.org/show_bug.cgi?id=7036





--- Comment #11 from Jim Cameron <jim_24601 at 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.


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list