Martin Storsjo : ntdll: Pass a nonnull handler_data when continuing after a collided unwind on arm64.

Alexandre Julliard julliard at winehq.org
Mon May 18 15:00:14 CDT 2020


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

Author: Martin Storsjo <martin at 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 at martin.st>
Signed-off-by: Alexandre Julliard <julliard at 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 30d445b408..e81ea8f82e 100644
--- a/dlls/ntdll/signal_arm64.c
+++ b/dlls/ntdll/signal_arm64.c
@@ -1843,7 +1843,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;
             }
@@ -1866,7 +1867,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;
                 }




More information about the wine-cvs mailing list