Files
ppsspp/Core/HLE
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
..
2025-07-22 17:48:20 +02:00
2026-01-19 17:56:30 +01:00
2025-07-22 17:48:20 +02:00
2025-07-22 17:48:20 +02:00
2025-07-22 17:48:20 +02:00
2025-12-30 20:31:07 +01:00
2025-04-03 14:13:50 +02:00
2025-08-06 17:44:54 +02:00
2026-01-18 23:40:13 +02:00
2025-07-20 19:30:35 +02:00
2025-07-20 19:30:35 +02:00
2025-04-15 11:18:53 +02:00
…
2025-12-30 20:31:06 +01:00
…
…
…
2026-07-16 15:03:20 +02:00
…
…
…
2025-04-14 22:27:51 +02:00
2025-03-05 17:02:46 +01:00
…
2025-07-20 19:32:05 +02:00
2025-07-20 19:32:05 +02:00
2025-02-14 09:50:55 -06:00
2026-07-18 11:57:56 +02:00
2026-06-13 17:12:16 +02:00
…
2025-01-05 19:14:15 +01:00
2025-04-03 14:13:50 +02:00
…
2025-05-27 17:48:23 +02:00
2025-02-04 11:53:22 -06:00
…