Module: wine Branch: master Commit: 5a10705f0c57142c6317bfab660d6270116c332c URL: http://source.winehq.org/git/wine.git/?a=commit;h=5a10705f0c57142c6317bfab66...
Author: Daniel Lehman dlehman@esri.com Date: Tue Aug 2 17:16:52 2016 -0700
msvcrt: Call unwind handlers on intermediate frames during virtual unwind.
Signed-off-by: Daniel Lehman dlehman@esri.com Signed-off-by: Piotr Caban piotr@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/msvcrt/except_x86_64.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/msvcrt/except_x86_64.c b/dlls/msvcrt/except_x86_64.c index 3a90a66..80780ae 100644 --- a/dlls/msvcrt/except_x86_64.c +++ b/dlls/msvcrt/except_x86_64.c @@ -470,14 +470,20 @@ static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG64 frame, if (rec->ExceptionCode==STATUS_UNWIND_CONSOLIDATE && rec->NumberParameters==6 && rec->ExceptionInformation[0]==(ULONG_PTR)call_catch_block) { - ULONG64 orig_frame = rec->ExceptionInformation[1]; - const cxx_function_descr *descr = (void*)rec->ExceptionInformation[2]; - int end_level = rec->ExceptionInformation[3]; EXCEPTION_RECORD *new_rec = (void*)rec->ExceptionInformation[4]; thread_data_t *data = msvcrt_get_thread_data(); frame_info *cur;
- cxx_local_unwind(orig_frame, dispatch, descr, end_level); + if (rec->ExceptionFlags & EH_TARGET_UNWIND) + { + ULONG64 orig_frame = rec->ExceptionInformation[1]; + const cxx_function_descr *orig_descr = (void*)rec->ExceptionInformation[2]; + int end_level = rec->ExceptionInformation[3]; + + cxx_local_unwind(orig_frame, dispatch, orig_descr, end_level); + } + else + cxx_local_unwind(frame, dispatch, descr, -1);
/* FIXME: we should only unregister frames registered by call_catch_block here */ for (cur = data->frame_info_head; cur; cur = cur->next)