Commit Graph
3 Commits
Author SHA1 Message Date
illuminatedfellow 108a897113 XMem: physical page numbers freed are given out again before they pass the title's 21 bits
Page numbers only ever grew, and the title keeps them as 21-bit
`number >> 4`: past ~124 GiB of allocations over a run, a number came
back truncated, unknown to us or aliasing a live page. Numbers are still
given in order while they fit; then the lowest run of freed ones is used,
and an allocation with no such run fails (count 0) instead of handing out
a number the title cannot keep.

Port of avatarmanz/VIctory-7900XTX#316 (issue #233 there).

(cherry picked from commit 0db908bf11b861dcafc69eca9ef78c9e53b41ff1)
2026-11-27 17:51:23 -08:00
illuminatedfellow c12c4959a5 Tidy-ups: replay event, timeline after end, VICTORY_WATCH, validator status
- Replay: a Worker closes its fence event when dropped (one leaked per
  256 MiB upload batch in diagnostics builds).
- Timeline: put_of and stack write nothing once recording has ended, so
  events that straddle end() no longer land in the next recording.
- VICTORY_WATCH: rva + 4 is checked, as VICTORY_CRASH_SAVE's ranges are
  (a huge RVA in the list wrapped instead of being dropped).
- Validator: a failed GetStatus is an error, not a pass, and an error blob
  with a null pointer reads as empty instead of building a slice from null.

Port of avatarmanz/VIctory-7900XTX#319 (its issue #227).

(cherry picked from commit 8db88ce6fe40cdd03bc9f9b66fb5d31c92bd246d)
2026-11-27 17:29:35 -08:00
illuminatedfellow a12e0ae254 ir::build: a scalar code past the registers is not an index past unspill's table
unspill marks the scalar codes a program uses in a table of 128, but an
instruction's effects can name a code up to 255 (a VOP3 compare whose
sdst field holds a constant's code, e.g. 0xD4C5A8D7), which panicked
with an index out of bounds instead of a translation error. The table
now covers every code, as stores and other beside it already do.

Found by fuzzing the translator (mutated test programs and random words
through ir::build, structure, resources, io and lowering). Port of
avatarmanz/VIctory-7900XTX#325; the new test panics on this main
(index 215, len 128) and passes with the change.

(cherry picked from commit d30f8bee17096cab6a6de3f5f37244211dcaa861)
2026-11-27 17:29:35 -08:00