Replay: --dump handles code that was not recorded; shader code checked against shaders.bin before allocating #276
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!276
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-276"
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?
@sharan104 on GitHub · 2026-11-26 14:04 UTC · original
sharan104:fix/replay-dump-missing-code→main· +71 −6 · 1 files · 1 commits · openTwo crashes in
victory replayon captures it should handle:--dumpon a pipeline whose code wasn't recorded. When the recorder can't write a shader, it numbers the codeu32::MAXon purpose (record.rs).dumpindexedframe.codes[blob]and panicked on such a capture, which the recorder itself produces.dump, and the pipeline building inPlayer, sized a buffer straight from the code length stored inframe.bin. A wild length either panicked with a capacity overflow or aborted out of memory before the read could fail.Fix:
dumpwrites<kind>=(not recorded)for a missing code and carries on with the pipeline's other parts.code(file, c), checksat + lenagainst the size ofshaders.bin(overflow included) before allocating. Both readers use it.Test:
shaders_are_dumped_from_what_the_capture_holdsdumps a pipeline with one recorded code and oneu32::MAXcode. It gets18=….dxil 23=(not recorded)and the right bytes. A length past the file, and one ofu64::MAX, are both refused without allocating. The test panicked before the fix (index out of bounds) and passed 10 runs out of 10 after it.Results:
--features diagnosticspass.-D warningsadds nothing beyond main's existingwatch.rslint, which #241 fixes.🤖 Generated with Claude Code
When the recorder cannot write a shader to shaders.bin it numbers the code u32::MAX ("shader code could not be written"), and the replay makes such a pipeline without it. `victory replay --dump` indexed the codes with that number and panicked on such a capture. It also made room for a code's length straight from frame.bin, as did the replay's making of pipelines, so a corrupt or truncated capture with a wild length panicked (capacity overflow) or aborted out of memory instead of being refused. --dump now names a code that is not there "(not recorded)" and goes on, and both read code through `code`, which refuses a place past the end of shaders.bin before allocating. Test: shaders_are_dumped_from_what_the_capture_holds (fails before the fix, with the index out of bounds; passes after). Co-Authored-By: Claude Opus 5.5 <[email protected]>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.