From 4fadb4030f4a8b5db5a81819f298be98ccd57091 Mon Sep 17 00:00:00 2001 From: butilly Date: Mon, 9 Nov 2026 20:35:47 +0000 Subject: [PATCH] WOW64: preserve full host PC when locating JIT exception blocks --- wine/wow64/wowbox64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wine/wow64/wowbox64.c b/wine/wow64/wowbox64.c index 7ee9fe474..1ee1a1c31 100644 --- a/wine/wow64/wowbox64.c +++ b/wine/wow64/wowbox64.c @@ -335,7 +335,8 @@ NTSTATUS WINAPI BTCpuResetToConsistentState(EXCEPTION_POINTERS* ptrs) } } - if (!box64_is_addr_in_jit(ULongToPtr(ctx->Pc))) + /* The host JIT can be above 4 GiB even when the guest is 32-bit. */ + if (!box64_is_addr_in_jit((void*)(uintptr_t)ctx->Pc)) return STATUS_SUCCESS; /* Replace the host context with one captured before JIT entry so host code can unwind */