mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
Fix page fault area range check
Range end check was bugged (always true), also rewrite it so vm::get would be called only once
This commit is contained in:
parent
f2bbae9db4
commit
16f86b2458
@ -1280,13 +1280,13 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
|
||||
|
||||
if (auto pf_entries = fxm::get<page_fault_notification_entries>())
|
||||
{
|
||||
std::shared_lock lock(pf_entries->mutex);
|
||||
|
||||
for (const auto& entry : pf_entries->entries)
|
||||
if (auto mem = vm::get(vm::any, addr))
|
||||
{
|
||||
if (auto mem = vm::get(vm::any, entry.start_addr))
|
||||
std::shared_lock lock(pf_entries->mutex);
|
||||
|
||||
for (const auto& entry : pf_entries->entries)
|
||||
{
|
||||
if (entry.start_addr <= addr && addr <= addr + mem->size - 1)
|
||||
if (entry.start_addr == mem->addr)
|
||||
{
|
||||
pf_port_id = entry.port_id;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user