Files
ppsspp/Core
Ren 9296bf0a04 Savestate: don't let stale HLE helper threads mutate restored kernel state
On savestate load, two sites delete a pre-load host object that owns an
HLEHelperThread without calling Forget() first, so ~HLEHelperThread runs
__KernelDeleteThread and kernelMemory.Free() with thread ids and block
addresses from before the load, against the freshly restored kernel
state:

- sceUtility: Do(p, accessThread) deletes the stale accessThread inside
  DoClass before recreating it from the stream.
- scePsmf: Do(p, psmfPlayerMap) deletes every existing PsmfPlayer, and
  ~PsmfPlayer -> AbortFinish() deletes its finishThread raw.

When the stale id or block happens to be absent from the restored state
this only logs errors ("... does not exist" / "BlockAllocator: invalid
free"). When it has been recycled, a live thread is terminated or a
live allocation is freed, silently corrupting the loaded state. Easiest
to hit by loading a state while a savedata operation or PSMF player is
active, into a session where those ids were reused.

__IoDoState and __PsmfShutdown already Forget() before deleting; do the
same at these two sites. Worst case behavior change is a leaked
kernel-side thread record where one was previously (incorrectly)
freed.
2026-07-27 16:20:01 +02:00
..
2026-06-02 11:15:08 +02:00
2026-07-21 14:00:02 +02:00
2026-06-12 17:28:52 +02:00
2025-05-31 18:25:55 +02:00
2025-03-27 14:26:48 +01:00
2025-08-31 13:37:43 +02:00
2026-06-24 23:04:17 +02:00
2026-04-07 20:52:38 -06:00
2026-05-19 13:59:04 +02:00
2026-06-02 17:16:45 +02:00
2026-07-23 15:04:04 -04:00
2025-10-27 12:20:24 +01:00