Shaders: bound signature tables before allocating elements #1116
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1116
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1116"
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?
@anakatt on GitHub · 2026-11-24 11:56 UTC · original
anakatt:shaders/bound-signature-tables→main· +19 −0 · 1 files · 1 commits · openI validate the complete DXBC signature table before allocating from its declared element count. Previously, a truncated final element could be accepted, and an oversized count reached allocation before the parser checked the table bounds.
What is in it
Vec::with_capacity.Tested
I ran the tests on Windows 11 Pro ARM64 10.0.26100.1742 in UTM (4 GiB RAM, virtual
virt-10.0CPU, Red Hat VirtIO GPU DOD), using Rust 1.100.0x86_64-pc-windows-msvcand Visual Studio 2022 Build Tools. The guest used a source archive of main47efa2ecea0a12934719ae69b81930cf02a4b1c3plus the source changes committed as24fd09fcfc29a323ab47770ecf132a05b46a63eb.cargo test --locked -p xcl --lib gpu::dxbc::tests::rejects_signature_tables_outside_the_part -- --exact: 0 passed, 1 failed, 0 ignored, 719 filtered out. The truncated signature returnedSomeinstead ofNone.cargo test --locked -p xcl --lib gpu::dxbc -- --test-threads=4: 3 passed, 0 failed, 0 ignored, 717 filtered out; noSKIPPEDoutput.Not tested
I have not run the full workspace suite, native x64 Windows hardware, D3D12 GPU execution, or a real game title. The VM's display adapter is not D3D12 GPU coverage.
Regression run
Not run. This remains a draft until both required real-title
xcl-smokeblocks are available: one from main and one from this PR's clean head, using the same title and duration. The focused tests above do not replace those runs.AI use
I used omp (
openai-codex/gpt-6-astra) to investigate, implement the fix and regression, run the Windows tests, and prepare this PR.github-bot referenced this pull request2026-11-26 04:59:09 +00:00
@eizispark on GitHub · 2026-11-24 13:27 UTC · original
Hardware test report — commit
24fd09fVerified clean merge with
main(47efa2e) on24fd09fcfc29a323ab47770ecf132a05b46a63eb: pass.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09), release + test profilecargo test --workspace --no-fail-fast -- --test-threads=4:742 passed, 0 failed, 41 ignored(GPU tests skipped on this adapter:none), includinggpu::dxbc::tests::rejects_signature_tables_outside_the_partand all 3gpu::dxbc::testsRegression run
main(47efa2e):PR (
24fd09f):Not tested
XCL_D3D12_DEBUG=1; gameplay past the menusAI use: Antigravity (Google DeepMind), Gemini (exact version string not exposed in runtime environment) — ran the workspace test suite and 60 s retail smoke check on the hardware above and formatted this report.
@raylitebull on GitHub · 2026-11-25 01:13 UTC · original
Diff audit passed (
dxbc.rs::signaturebounds-checksfirst + count * strideviachecked_add/checked_mulandd.get(first..table_end)?beforeVec::with_capacity),Build and testis green, and AMD RX 9070 XT verified24fd09f.Remaining before merge:
xcl-smokepair in the PR description so thePR descriptioncheck turns green.@DavidM1911 on GitHub · 2026-11-25 08:16 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@thehollowedone on GitHub · 2026-11-25 10:43 UTC · original
Independent NVIDIA check on 24fd09f. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, DXC 1.8.2502.11.
cargo build --workspace --offline --locked -j 4passed.cargo test --workspace --offline --locked --no-fail-fast -j 4 -- --nocapture --test-threads=4ended with 742 passed, 0 failed, 41 ignored, with two wave64 runtime skips in Cargo’s pass count.A scratch check parsed valid compiler-generated legacy DXBC
ISGN/OSGNand DXILISG1/OSG1vertex and pixel signatures. It checked both float and unsigned-integer stage inputs. An input layout built from the parsed DXIL vertex signature drew 64 of 64 expected pixels on native D3D12. The focusedcargo test --offline --locked -j 4 -p xcl --lib local_valid_dxbc_signatures_link_and_draw_on_d3d12 -- --nocapture --test-threads=1passed 1 of 1 without skips. Legacy DXBC coverage was parser-only. The existing matched AMD smoke pair is separate from this synthetic run.AI use: Codex (GPT-6, exact variant unspecified) wrote the scratch fixture, ran the tests and drafted this report.
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.