[PATCH] ntdll: Force align the stack in RtlRaiseException() on i386.
This is an assembly function, so we have to do it manually. Signed-off-by: Chip Davis <cdavis(a)codeweavers.com> --- dlls/ntdll/signal_i386.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index e9dd0de2fc3c..159819a92ba2 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -2548,14 +2548,20 @@ __ASM_STDCALL_FUNC( RtlRaiseException, 4, "movl %esp,%ebp\n\t" __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") "leal -0x2cc(%esp),%esp\n\t" /* sizeof(CONTEXT) */ - "pushl %esp\n\t" /* context */ + "andl $-16,%esp\n\t" + "subl $16,%esp\n\t" + "movl %esp,%eax\n\t" + "subl $12,%esp\n\t" /* stack alignment */ + "pushl %eax\n\t" /* context */ "call " __ASM_STDCALL("RtlCaptureContext",4) "\n\t" + "addl $12,%esp\n\t" "movl 4(%ebp),%eax\n\t" /* return address */ "movl 8(%ebp),%ecx\n\t" /* rec */ "movl %eax,12(%ecx)\n\t" /* rec->ExceptionAddress */ "leal 12(%ebp),%eax\n\t" "movl %eax,0xc4(%esp)\n\t" /* context->Esp */ "movl %esp,%eax\n\t" + "subl $8,%esp\n\t" /* stack alignment */ "pushl %eax\n\t" "pushl %ecx\n\t" "call " __ASM_NAME("raise_exception_full_context") "\n\t" -- 2.24.0
Hi, While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=63129 Your paranoid android. === debian10 (32 bit report) === ntdll: exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 === debian10 (32 bit Chinese:China report) === ntdll: exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 === debian10 (32 bit WoW report) === ntdll: exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 === debian10 (64 bit WoW report) === ntdll: exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844 exception.c:375: Test failed: debugger managed to modify Eax to 6ef9e0 should be 7BCAE844
participants (2)
-
Chip Davis -
Marvin