GPU: validate null args in create_deserializer to prevent d3d12 AV and add root.rs tests #1078

Closed
opened 2026-11-26 04:19:11 +00:00 by github-bot · 0 comments
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-24 15:31 UTC · original

Summary

Fixes a real access-violation crash (0xc0000005 in d3d12.dll) in create_deserializer in crates/victory-gpu/src/root.rs and expands deterministic synthetic unit tests from 3 to 11 passing tests.

Because external PR creation is currently restricted (collaborators_only), the CI-green branch is ready on my fork for cherry-pick / review:

  • Branch: geiyiliyabumo/VIctory@test/gpu-root-audit
  • Commit: geiyiliyabumo/VIctory@ef0c3e9 (based on main ffe310e)

Changes (crates/victory-gpu/src/root.rs)

  • Bug fix: create_deserializer previously forwarded a null riid straight to host D3D12CreateRootSignatureDeserializer, crashing with STATUS_ACCESS_VIOLATION. It now rejects null blob, size == 0, null riid, and null out with E_INVALIDARG before calling the host.
  • Tests (3 -> 11 synthetic): covers ABI layout of Desc/VersionedDesc, console-flag masking, null-desc rejection on both serializers, deserializer null-arg crash regression, create IID/null-out probing, all 3 IIDs + refcount lifecycle, vtable slots 0x28/0x30/0x38, and host rejection of truncated/garbage blobs.

Verification (Windows 11 x64 MSVC)

  • rustfmt --edition 2024 --check crates/victory-gpu/src/root.rs: PASS
  • cargo xtask policy: PASS (154 files ok)
  • cargo clippy -p victory-gpu --all-targets --locked -- -D warnings (default + --features diagnostics): PASS (0 warnings)
  • cargo test -p victory-gpu --locked -- root::: 11 passed, 0 failed

AI-assisted; synthetic tests only, no game files.

**@⁠geiyiliyabumo** on GitHub · 2026-11-24 15:31 UTC · [original](https://github.com/Marvisak/VIctory/issues/1078) ### Summary Fixes a real access-violation crash (`0xc0000005` in `d3d12.dll`) in `create_deserializer` in `crates/victory-gpu/src/root.rs` and expands deterministic synthetic unit tests from 3 to **11 passing tests**. Because external PR creation is currently restricted (`collaborators_only`), the CI-green branch is ready on my fork for cherry-pick / review: - **Branch**: `geiyiliyabumo/VIctory@test/gpu-root-audit` - **Commit**: `geiyiliyabumo/VIctory@ef0c3e9` (based on `main` `ffe310e`) ### Changes (`crates/victory-gpu/src/root.rs`) - **Bug fix**: `create_deserializer` previously forwarded a null `riid` straight to host `D3D12CreateRootSignatureDeserializer`, crashing with `STATUS_ACCESS_VIOLATION`. It now rejects null blob, `size == 0`, null `riid`, and null `out` with `E_INVALIDARG` before calling the host. - **Tests (3 -> 11 synthetic)**: covers ABI layout of `Desc`/`VersionedDesc`, console-flag masking, null-desc rejection on both serializers, deserializer null-arg crash regression, `create` IID/null-out probing, all 3 IIDs + refcount lifecycle, vtable slots `0x28`/`0x30`/`0x38`, and host rejection of truncated/garbage blobs. ### Verification (Windows 11 x64 MSVC) - `rustfmt --edition 2024 --check crates/victory-gpu/src/root.rs`: **PASS** - `cargo xtask policy`: **PASS** (`154 files ok`) - `cargo clippy -p victory-gpu --all-targets --locked -- -D warnings` (default + `--features diagnostics`): **PASS** (0 warnings) - `cargo test -p victory-gpu --locked -- root::`: **11 passed, 0 failed** *AI-assisted; synthetic tests only, no game files.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:19:11 +00:00
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#1078
No description provided.