ntdll: Make sure the stack is quad-word aligned on ARM64 (try 2)
André Hentschel
nerv at dawncrow.de
Mon Jul 24 11:38:48 CDT 2017
EXCEPTION_RECORD is not correctly aligned and until bd1f7ef1868dd563a82eacd1bf414bf8d1a7254e, CONTEXT wasn't either,
which ended in an correctly aligned structure, but the mentioned commit changed that.
Signed-off-by: André Hentschel <nerv at dawncrow.de>
---
dlls/ntdll/signal_arm64.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c
index 3a51567..1baf5a8 100644
--- a/dlls/ntdll/signal_arm64.c
+++ b/dlls/ntdll/signal_arm64.c
@@ -386,8 +386,8 @@ static EXCEPTION_RECORD *setup_exception( ucontext_t *sigcontext, raise_func fun
} *stack;
DWORD exception_code = 0;
- stack = (struct stack_layout *)(SP_sig(sigcontext) & ~15);
- stack--; /* push the stack_layout structure */
+ /* push the stack_layout structure */
+ stack = (struct stack_layout *)((SP_sig(sigcontext) - sizeof(stack[0])) & ~15);
stack->rec.ExceptionRecord = NULL;
stack->rec.ExceptionCode = exception_code;
--
2.7.4
More information about the wine-patches
mailing list