diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index 0c187eccb6..62edef9faa 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -1409,9 +1409,9 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) no return false; } - if (area->flags & 0x100 || (is_writing && vm::check_addr(addr))) + if (vm::reader_lock rlock; vm::check_addr(addr, 0)) { - // For 4kb pages or read only memory + // For allocated memory with protection lower than required (such as protection::no or read-only while writing to it) utils::memory_protect(vm::base(addr & -0x1000), 0x1000, utils::protection::rw); return true; } diff --git a/rpcs3/rpcs3qt/debugger_list.cpp b/rpcs3/rpcs3qt/debugger_list.cpp index 6bac1cf490..f8397651c0 100644 --- a/rpcs3/rpcs3qt/debugger_list.cpp +++ b/rpcs3/rpcs3qt/debugger_list.cpp @@ -111,7 +111,7 @@ void debugger_list::ShowAddress(u32 addr, bool force) item(i)->setBackground(default_background); } - if (m_cpu->id_type() == 1 && !vm::check_addr(pc)) + if (m_cpu->id_type() == 1 && !vm::check_addr(pc, 0)) { item(i)->setText((IsBreakpoint(pc) ? ">> " : " ") + qstr(fmt::format("[%08x] ?? ?? ?? ??:", pc))); count = 4;