=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: ntdll: Make sure the stack is quad-word aligned on ARM64.

Alexandre Julliard julliard at winehq.org
Mon Jul 24 15:51:21 CDT 2017


Module: wine
Branch: master
Commit: 2e9611bbd0654d74f08f2ad154e457f48b54f6f5
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2e9611bbd0654d74f08f2ad154e457f48b54f6f5

Author: André Hentschel <nerv at dawncrow.de>
Date:   Mon Jul 24 18:38:48 2017 +0200

ntdll: Make sure the stack is quad-word aligned on ARM64.

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

---

 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..4b305e3 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)) & ~15);
 
     stack->rec.ExceptionRecord  = NULL;
     stack->rec.ExceptionCode    = exception_code;




More information about the wine-cvs mailing list