https://bugs.winehq.org/show_bug.cgi?id=21917
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
--- Comment #10 from Sebastian Lackner sebastian@fds-team.de --- I'm wondering why noone worked on this, although the solution is well-known since two years? Anyway, here are some patches which seem to fix the issue for me:
https://github.com/compholio/wine-compholio/blob/master/patches/ntdll-Save_R...
https://github.com/compholio/wine-compholio/blob/master/patches/ntdll-Save_R...
Will try to get them upstream during the next week(s). I'm still not completely happy about the fact that this code cannot handle when esi is modified, but its probably better than having to rely on the stack pointer. The alternative solution would be to enforce some align before the function call (gcc should already do that, but its probably better to enforce it), and then round esp afterwards to get appropriate pointers to the saved registerss... but there is no guarantee that the Windows code will always use "ret {0,4,8,12}", it could also use a jump or other weird methods ... :/