[PATCH] vcruntime140_1: Pass frame to unwind handler.

Daniel Lehman dlehman25 at gmail.com
Thu May 28 01:35:23 CDT 2020


Signed-off-by: Daniel Lehman <dlehman25 at gmail.com>
---

some unwind handlers just need the frame; object is already on the original frame's stack
also, this is consistent with FH3 code and ehandler in call_catch_block4

---
 dlls/vcruntime140_1/except_x86_64.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/vcruntime140_1/except_x86_64.c b/dlls/vcruntime140_1/except_x86_64.c
index e1a39c0662..9c48a1fdff 100644
--- a/dlls/vcruntime140_1/except_x86_64.c
+++ b/dlls/vcruntime140_1/except_x86_64.c
@@ -403,7 +403,7 @@ static inline void copy_exception(void *object, ULONG64 frame, DISPATCHER_CONTEX
 static void cxx_local_unwind4(ULONG64 frame, DISPATCHER_CONTEXT *dispatch,
         const cxx_function_descr *descr, int trylevel, int last_level)
 {
-    void (__cdecl *handler_dtor)(void *obj);
+    void (__cdecl *handler_dtor)(void *obj, ULONG64 frame);
     BYTE *unwind_data, *last;
     unwind_info ui;
     void *obj;
@@ -442,7 +442,7 @@ static void cxx_local_unwind4(ULONG64 frame, DISPATCHER_CONTEXT *dispatch,
             handler_dtor = rva_to_ptr(ui.handler, dispatch->ImageBase);
             obj = rva_to_ptr(ui.object, frame);
             TRACE("handler: %p object: %p\n", handler_dtor, obj);
-            handler_dtor(obj);
+            handler_dtor(obj, frame);
         }
     }
 }
-- 
2.17.1




More information about the wine-devel mailing list