mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-28 10:59:16 -04:00
29d6acfdcb
Completes5b8098a(fail-closed lifecycle guards on the dispatch/is_candidate/ call_native entry points) at the root: overlay_find_by_range() and lazy_has_exact_entry() are the loops that actually spin when the loader is inactive — s_range_page_head[]/s_lazy_entry_head[] get their -1 empty sentinels only from overlay_loader_init(), which runs solely under overlay_cache=true (main.cpp). With overlay off they stay zero-initialized (0 == a valid index), so any unguarded caller traverses a garbage index and never terminates. That wedged every overlay-off + CPS game at boot before any game code ran (found via Ape Escape, the only overlay-off title). All present callers are already guarded; putting the guards inside the traversal functions makes them safe by construction for any future caller. Also records the CPS-wedge root cause on the dispatch guard. Re-land of the overlay-off boot-wedge fix from 6da8c02 (stale branch), reduced to the parts master's independent5b8098aport did not already cover. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>