Shaders: fix 4 DXIL validator bugs and add synthetic container/validator tests #1049
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#1049
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 15:16 UTC · original
Summary
Fixes 4 real defects in
crates/victory-shader/src/emit/validator.rs(previously 0 tests) and adds 17 deterministic synthetic unit tests acrossvalidator.rs(0 -> 9 tests) andcrates/victory-shader/src/emit/container.rs(1 -> 9 tests).Because external PR creation is currently restricted (
collaborators_only), the CI-green branch is ready on my fork for cherry-pick / review:geiyiliyabumo/VIctory@test/shader-container-validatorgeiyiliyabumo/VIctory@9ffb7a1(based onmainffe310e)Changes
crates/victory-shader/src/emit/validator.rs:GetStatusfails.Drop(releasing COM validator before freeing the module).crates/victory-shader/src/emit/container.rs:Verification (Windows 11 x64 MSVC)
rustfmt --edition 2024 --check: PASScargo xtask policy: PASS (154 files ok)cargo clippy -p victory-shader --all-targets --locked -- -D warnings: PASS (0 warnings)cargo test -p victory-shader --locked -- container::(9/9 PASS) &-- validator::(9/9 PASS)AI-assisted; synthetic tests only, no game files.
@Marvisak on GitHub · 2026-11-25 06:54 UTC · original · edited 2026-11-25 09:58 UTC
Automated triage for the maintainers.
Confirmed on
main(940d32f) incrates/victory-shader/src/emit/validator.rs:Validator::validateignores the HRESULT ofGetStatus, so if that call failsstatusstays 0 and the container is reported valid; it builds a slice withstd::slice::from_raw_partsfrom the error blob's pointer without checking for a null pointer of length 0; andValidator::loadnever frees thedxil.dllmodule (not on a failedDxcCreateInstance, nor inDrop). All three only affect the offline validator path, not the title's run.Open PR #477 ("fix DXIL validator UB on null error blobs, unchecked GetStatus, and COM/DLL handle leaks", also in bundle #1511) covers the same three defects, so review can continue there. The fork branch (
9ffb7a1) is far behindmain; itscontainer.rs/validator.rstests would need a rebase and a PR of their own (PRs are open to everyone).Generated by Claude Code
@StExpeditus on GitHub · 2026-11-25 09:35 UTC · original
Validated the fork branch on Windows 11 Pro 26200 (Intel Core i5-14600K, RTX 5060 Ti, driver 621.24, Rust 1.98.1 MSVC), commit
57d00fd:cargo test -p victory-shader --locked --no-fail-fast-> 139 passed, 0 failed, 1 ignored. Synthetic tests only, no game files.@StExpeditus on GitHub · 2026-11-25 09:38 UTC · original
Addendum: this branch is far behind current main (the
victory-shaderdelta is 34 files, ~16.5k lines), so the run above is the branch as-is on its old base; it needs a rebase before a clean cherry-pick.