From 2f5ea32377fc977ef14282c276020fba58799235 Mon Sep 17 00:00:00 2001 From: Daniel Lehman Date: Thu, 21 May 2020 20:51:30 -0700 Subject: [PATCH] vcruntime140_1: Use return address from catch block routine if not provided by catch block info. Signed-off-by: Daniel Lehman Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- dlls/vcruntime140_1/except_x86_64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/vcruntime140_1/except_x86_64.c b/dlls/vcruntime140_1/except_x86_64.c index 4cc68972235..e1a39c06620 100644 --- a/dlls/vcruntime140_1/except_x86_64.c +++ b/dlls/vcruntime140_1/except_x86_64.c @@ -603,7 +603,8 @@ static inline void find_catch_block4(EXCEPTION_RECORD *rec, CONTEXT *context, (ULONG_PTR)rva_to_ptr(ci.handler, dispatch->ImageBase); catch_record.ExceptionInformation[6] = (ULONG_PTR)untrans_rec; catch_record.ExceptionInformation[7] = (ULONG_PTR)context; - catch_record.ExceptionInformation[8] = (ULONG_PTR)rva_to_ptr( + if (ci.ret_addr) + catch_record.ExceptionInformation[8] = (ULONG_PTR)rva_to_ptr( ci.ret_addr + dispatch->FunctionEntry->BeginAddress, dispatch->ImageBase); RtlUnwindEx((void*)frame, (void*)dispatch->ControlPc, &catch_record, NULL, &ctx, NULL); }