Module: wine Branch: stable Commit: 6ff71b41275e63071c509c6a56573839b45d9d83 URL: https://source.winehq.org/git/wine.git/?a=commit;h=6ff71b41275e63071c509c6a5...
Author: Martin Storsjo martin@martin.st Date: Mon May 18 15:16:28 2020 +0300
ntdll: Pass a nonnull handler_data when continuing after a collided unwind on arm64.
This fixes crashes when handling GNU/mingw style SEH based C++ exceptions on arm64; in these cases unwind_full_data ended up where it tries to write handler_rva + 1 to *handler_data.
Signed-off-by: Martin Storsjo martin@martin.st Signed-off-by: Alexandre Julliard julliard@winehq.org (cherry picked from commit 93ecc54ae560a3677dfa78ca0f5448d7aef0cbd9) Signed-off-by: Michael Stefaniuc mstefani@winehq.org
---
dlls/ntdll/signal_arm64.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index d131160a76..614451d148 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -1857,7 +1857,8 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec dispatch.ContextRecord = context; RtlVirtualUnwind( UNW_FLAG_NHANDLER, dispatch.ImageBase, dispatch.ControlPc, dispatch.FunctionEntry, - &new_context, NULL, &frame, NULL ); + &new_context, &dispatch.HandlerData, &frame, + NULL ); rec->ExceptionFlags |= EH_COLLIDED_UNWIND; goto unwind_done; } @@ -1880,7 +1881,8 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec dispatch.ContextRecord = context; RtlVirtualUnwind( UNW_FLAG_NHANDLER, dispatch.ImageBase, dispatch.ControlPc, dispatch.FunctionEntry, - &new_context, NULL, &frame, NULL ); + &new_context, &dispatch.HandlerData, + &frame, NULL ); rec->ExceptionFlags |= EH_COLLIDED_UNWIND; goto unwind_done; }