Files
psxrecomp/runtime
Matthew Stanley 2ff21c4aff build+test: harden cg-tag against drift + codegen guard regression test
(1) OBJECT_DEPENDS on overlay_codegen_hash.h for the cg-tag CONSUMERS
(overlay_loader.c, boot_state.c). overlay_api.h pulls that header via
__has_include, which the compiler depfile does not record when the header is
absent at first compile -- so a later hash change left a STALE baked-in
PSX_OVERLAY_CODEGEN_HASH, making the loader READ cg<old> while autocompile WROTE
cg<new>: the runtime silently ignored freshly compiled shards and the area ran
~97% interpreted (the recurring read!=write overlay-lag class). The explicit
dependency makes the runtime cg tag unable to drift from the headers/autocompile.

(2) recompiler/tests/test_overlay_guard_codegen.py: deterministic codegen
regression test (no game) -- synthesizes a tiny PS-EXE, runs the recompiler in
overlay vs static mode, and asserts overlay functions emit the fail-closed
psx_native_bad_entry guard in their entry-switch default while static functions
keep the legacy fall-through. Guards the native-overlay blue-screen wedge fix.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 22:54:36 -07:00
..