Replay: refuse a capture with no resource start state #651
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/651"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by enzoduarte1 on 2026-11-27T16:28:48Z.
Frame::readvalidates the magic, version and trailing bytes, but not the semantic invariants the replay relies on. A capture whoseResource.stateis empty is accepted; later the replay indexesstate[0](replay/play.rs) and the last state of each barrier side (replay/gpu.rs), so such a file panics instead of being reported as a bad capture.The recorder cannot make such a frame:
States::getreturns at least[COMMON], and the snapshot falls back to that when a resource has no recorded state. This rejects only a file the recorder could not have written.Changes:
Frame::readnow rejects any resource with an empty start state withBad("a resource has no start state").wire::tests::a_frame_comes_backto write a frame whose first resource has no state and assert the read fails with that message.Validation (local GNU toolchain, MSVC
link.exeis not installed here):cargo clippy --workspace --all-targets --locked -- -D warnings— passed.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings— passed.cargo test -p victory-gpu --lib --features diagnostics replay::wire::tests::a_frame_comes_back -- --exact— passed.cargo test --workspace --locked -- --test-threads=1— all suites passed except the pre-existing/environmental-p victory-loader --test load_probeGNU linker failure (/DELAYLOAD:victory-probe-delayed.dll).cargo test --workspace --all-features --locked -- --test-threads=1— the new test passed. Four failures were reproduced on unmodifiedHEAD~1(timeline::report::real_waits_are_recorded_with_who_ended_themand threevictory-hlekernel/net tests), plus theload_probelinker failure. With only those known failures skipped, every suite passed, includingxtask policy.cargo fmt --all -- --checkis already dirty ona-publierwith the pinned rustfmt (many untouched files); this change adds no formatting diff towire.rs.Risk: none for captures the recorder produced. Corrupt captures now fail at read time with a clear error instead of panicking during replay. No open issue covers this exact case; none of the 200 open PRs touches
replay/wire.rs.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.