From 568667753dc8d1a5d014194ac4ed02c4ebf02e70 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Thu, 19 Dec 2024 18:08:56 +1000 Subject: [PATCH] CPU/CodeCache: Avoid log calls in faults outside of JIT code Could be in other functions that are unsafe to call log functions from. --- src/core/cpu_code_cache.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/core/cpu_code_cache.cpp b/src/core/cpu_code_cache.cpp index fc8fcbfe1..98dfd8c18 100644 --- a/src/core/cpu_code_cache.cpp +++ b/src/core/cpu_code_cache.cpp @@ -1707,15 +1707,12 @@ PageFaultHandler::HandlerResult CPU::CodeCache::HandleFastmemException(void* exc guest_address = std::numeric_limits::max(); } - DEV_LOG("Page fault handler invoked at PC={} Address={} {}, fastmem offset {:08X}", exception_pc, fault_address, - is_write ? "(write)" : "(read)", guest_address); - auto iter = s_fastmem_backpatch_info.find(exception_pc); if (iter == s_fastmem_backpatch_info.end()) - { - ERROR_LOG("No backpatch info found for {}", exception_pc); return PageFaultHandler::HandlerResult::ExecuteNextHandler; - } + + DEV_LOG("Page fault handler invoked at PC={} Address={} {}, fastmem offset {:08X}", exception_pc, fault_address, + is_write ? "(write)" : "(read)", guest_address); LoadstoreBackpatchInfo& info = iter->second; DEV_LOG("Backpatching {} at {}[{}] (pc {:08X} addr {:08X}): Bitmask {:08X} Addr {} Data {} Size {} Signed {:02X}",