Sebastian Lackner : kernel32: Fill stack with meaningful values in call_process_entry mis-align workaround.

Alexandre Julliard julliard at winehq.org
Mon Jul 9 16:00:33 CDT 2018


Module: wine
Branch: master
Commit: 61d92d1317272c4528872b091a5308905dd00429
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=61d92d1317272c4528872b091a5308905dd00429

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Sun Jul  8 21:19:56 2018 +0200

kernel32: Fill stack with meaningful values in call_process_entry mis-align workaround.

Signed-off-by: André Hentschel <nerv at dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/process.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index ff56e9a..7787a32 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -1042,7 +1042,9 @@ __ASM_GLOBAL_FUNC( call_process_entry,
                     __ASM_CFI(".cfi_rel_offset %ebp,0\n\t")
                     "movl %esp,%ebp\n\t"
                     __ASM_CFI(".cfi_def_cfa_register %ebp\n\t")
-                    "subl $12,%esp\n\t"  /* deliberately mis-align the stack by 8, Doom 3 needs this */
+                    "pushl 4(%ebp)\n\t"  /* deliberately mis-align the stack by 8, Doom 3 needs this */
+                    "pushl 4(%ebp)\n\t"  /* Driller expects readable address at this offset */
+                    "pushl 4(%ebp)\n\t"
                     "pushl 8(%ebp)\n\t"
                     "call *12(%ebp)\n\t"
                     "leave\n\t"




More information about the wine-cvs mailing list