Module: wine Branch: master Commit: f52b33c63064aa59f48a9c10d624e3508da55b88 URL: https://source.winehq.org/git/wine.git/?a=commit;h=f52b33c63064aa59f48a9c10d...
Author: Piotr Caban piotr@codeweavers.com Date: Wed Apr 22 12:21:35 2020 +0200
vcruntime140_1: Fix rethrow handling in __CxxFrameHandler4.
Signed-off-by: Piotr Caban piotr@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/vcruntime140_1/except_x86_64.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/vcruntime140_1/except_x86_64.c b/dlls/vcruntime140_1/except_x86_64.c index 5d07a1ac2c..4cc6897223 100644 --- a/dlls/vcruntime140_1/except_x86_64.c +++ b/dlls/vcruntime140_1/except_x86_64.c @@ -452,12 +452,12 @@ static LONG CALLBACK cxx_rethrow_filter(PEXCEPTION_POINTERS eptrs, void *c) EXCEPTION_RECORD *rec = eptrs->ExceptionRecord; cxx_catch_ctx *ctx = c;
- FlsSetValue(fls_index, (void*)(DWORD_PTR)ctx->search_state); + if (rec->ExceptionCode == CXX_EXCEPTION && !rec->ExceptionInformation[1] && !rec->ExceptionInformation[2]) + return EXCEPTION_EXECUTE_HANDLER;
+ FlsSetValue(fls_index, (void*)(DWORD_PTR)ctx->search_state); if (rec->ExceptionCode != CXX_EXCEPTION) return EXCEPTION_CONTINUE_SEARCH; - if (!rec->ExceptionInformation[1] && !rec->ExceptionInformation[2]) - return EXCEPTION_EXECUTE_HANDLER; if (rec->ExceptionInformation[1] == ((EXCEPTION_RECORD*)*__current_exception())->ExceptionInformation[1]) ctx->rethrow = TRUE; return EXCEPTION_CONTINUE_SEARCH; @@ -499,6 +499,7 @@ static void* WINAPI call_catch_block4(EXCEPTION_RECORD *rec) { TRACE("detect rethrow: exception code: %x\n", prev_rec->ExceptionCode); ctx.rethrow = TRUE; + FlsSetValue(fls_index, (void*)(DWORD_PTR)ctx.search_state);
if (untrans_rec) {