mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 17:49:29 +01:00
SaveState: Fixes from a review of the kernel savestates
- A partition memory block restored its allocator through BlockAllocatorFromID, whose privilege check asked the thread current before the load, already deleted with the kernel objects. Loading a kernel-partition block under a user thread left it without an allocator, crashing when it was freed. The saved id maps straight back now, and the current thread is cleared along with the objects. - The thread LoadExec leaves waiting (with no timeout) for plugins and VSH modules to start wasn't saved, so a state saved while one was starting hung the game thread after loading. The VSH modules still to start weren't saved either, nor cleared. - A state without the exit callback id left the previous session's. - From a broken or crafted state: thread ids that GetFast trusts (current, idle and ready), interrupt handler numbers, FPL and TLSPL indices, and a MIPS call or action slot that isn't there. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d40137a007
commit
30cab94840
8 files changed
+91
-6
No files matched your search
@@ -218,6 +218,10 @@ void IntrHandler::DoState(PointerWrap &p)
|
||||
|
||||
Do(p, intrNumber);
|
||||
Do<int, SubIntrHandler>(p, subIntrHandlers);
|
||||
if (p.mode == p.MODE_READ && (intrNumber < 0 || intrNumber >= PSP_NUMBER_INTERRUPTS)) {
|
||||
ERROR_LOG(Log::sceIntc, "Savestate failure: invalid interrupt handler %d", intrNumber);
|
||||
p.SetError(p.ERROR_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
void PendingInterrupt::DoState(PointerWrap &p)
|
||||
|
||||
Reference in new issue
Block a user