Files
psxrecomp/runtime
Alexandros Mandravillis 1da867ea99 runtime: recompute the text-modified bitmap after a state restore
dirty_ram_text_guard_resync_after_restore() cleared text_modified_bitmap,
and the page-clean fast path in dirty_ram_text_native_ok_ranges_from()
then trusted a clear bit as "bytes still equal the reference" and skipped
the compare. Restored RAM may carry self-modified text (the CMR2 class)
that no live write will ever re-flag: the bitmap is not part of the state
image, and the writes happened in the process that produced it. After a
save-state load into a fresh process, a stale native body could be
admitted for those pages.

Recompute the bitmap from the bytes: one pass over the reference range (at
most 2 MB, once per restore), setting the bit for every page that differs,
so those pages stay under the exact compare.

(cherry picked from commit ab186edf6, memory.c part)
2026-09-16 20:00:33 +03:00
..
2026-08-15 14:46:26 -07:00
2026-08-13 10:37:18 -04:00
2026-07-29 03:18:10 -04:00