Paul Gofman : ntdll: Also save unwind info for rbp in call_consolidate_callback() on x64.

Alexandre Julliard julliard at winehq.org
Mon Aug 24 15:58:50 CDT 2020


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

Author: Paul Gofman <pgofman at codeweavers.com>
Date:   Fri Aug 21 23:56:41 2020 +0300

ntdll: Also save unwind info for rbp in call_consolidate_callback() on x64.

Fixes Bloons TD 6 crash on start.

Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/signal_x86_64.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
index 564b74b7be..87acff3dcd 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -1029,9 +1029,9 @@ __ASM_GLOBAL_FUNC( call_consolidate_callback,
                    __ASM_SEH(".seh_pushframe\n\t")
                    __ASM_SEH(".seh_endprologue\n\t")
 
-                   "subq $0xf8,%rsp\n\t" /* 10*16 (float regs) + 7*8 (int regs) + 32 (shadow store). */
-                   __ASM_SEH(".seh_stackalloc 0xf8\n\t")
-                   __ASM_CFI(".cfi_adjust_cfa_offset 0xf8\n\t")
+                   "subq $0x108,%rsp\n\t" /* 10*16 (float regs) + 8*8 (int regs) + 32 (shadow store) + 8 (align). */
+                   __ASM_SEH(".seh_stackalloc 0x108\n\t")
+                   __ASM_CFI(".cfi_adjust_cfa_offset 0x108\n\t")
 
                    /* Setup CFI unwind to context. */
                    "movq %rcx,0x10(%rbp)\n\t"
@@ -1058,6 +1058,9 @@ __ASM_GLOBAL_FUNC( call_consolidate_callback,
                    __ASM_CFI(".cfi_escape 0x10,0x20,0x06,0x76,0x10,0x06,0x23,0x90,0x05\n\t") /* %xmm15 */
 
                    /* Setup SEH unwind registers restore. */
+                   "movq 0xa0(%rcx),%rax\n\t" /* context->Rbp */
+                   "movq %rax,0x100(%rsp)\n\t"
+                   __ASM_SEH(".seh_savereg %rbp, 0x100\n\t")
                    "movq 0x90(%rcx),%rax\n\t" /* context->Rbx */
                    "movq %rax,0x20(%rsp)\n\t"
                    __ASM_SEH(".seh_savereg %rbx, 0x20\n\t")




More information about the wine-cvs mailing list