Shaders: bounds-check DXIL header offsets and recognize dword zero padding #1303
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1303
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1303"
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?
@geiyiliyabumo on GitHub · 2026-11-24 17:17 UTC · original
geiyiliyabumo:test/shader-dxil-audit→main· +98 −19 · 1 files · 1 commits · openSummary
Audits \crates/victory-shader/src/dxil.rs\ and fixes two parser/layout issues:
Verification
AI-assisted; synthetic tests only, no game files.
@Marvisak on GitHub · 2026-11-25 02:34 UTC · original
Automated triage for the maintainers. Thank you for the careful tests, but this adds guards for cases that cannot occur. VIctory builds only for
x86_64-pc-windows-msvc(rust-toolchain.toml), and on 64-bitusize,8 + offset + lenfrom twou32fields cannot overflow; out-of-range values were already rejected by the existingget(..). LLVM's bitstream writer emits whole 32-bit words, so DXIL bitcode never needs the 1-3 bytes of padding thatis_standard_layoutwould now accept. Also, nothing in the workspace callsDxilProgram::parseexcept its own tests incrates/victory-shader/src/dxil.rs, so behaviour does not change. A malformed input thatmainhandles wrongly, or a caller that needs the change, would change this verdict. This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes thetriage: proposed closelabel.Generated by Claude Code
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.