mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
Fix crash on exit after access violation
This commit is contained in:
parent
c0a0cb98c5
commit
4b1c052030
@ -1295,6 +1295,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vm::temporary_unlock(*cpu);
|
||||||
LOG_FATAL(MEMORY, "Access violation %s location 0x%x", is_writing ? "writing" : "reading", addr);
|
LOG_FATAL(MEMORY, "Access violation %s location 0x%x", is_writing ? "writing" : "reading", addr);
|
||||||
cpu->state += cpu_flag::dbg_pause;
|
cpu->state += cpu_flag::dbg_pause;
|
||||||
cpu->check_state();
|
cpu->check_state();
|
||||||
|
@ -924,7 +924,13 @@ void Emulator::Stop(bool restart)
|
|||||||
auto on_select = [&](u32, cpu_thread& cpu)
|
auto on_select = [&](u32, cpu_thread& cpu)
|
||||||
{
|
{
|
||||||
cpu.state += cpu_flag::dbg_global_stop;
|
cpu.state += cpu_flag::dbg_global_stop;
|
||||||
cpu.get()->set_exception(e_stop);
|
|
||||||
|
// Can't normally be null.
|
||||||
|
// Hack for a possible vm deadlock on thread creation.
|
||||||
|
if (auto thread = cpu.get())
|
||||||
|
{
|
||||||
|
thread->set_exception(e_stop);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
idm::select<ppu_thread>(on_select);
|
idm::select<ppu_thread>(on_select);
|
||||||
|
Loading…
Reference in New Issue
Block a user