Repository navigation
Conversation
Check the full width of each scalar load so a valid starting offset cannot hide a read past the packed table. Exercise valid and oversized reads with a synthetic shader. Assisted-by: Codex (gpt-6.2-sol)
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Tested On the earlier #1196/#1088 CLI integration, the four wider cases counted as successful loads. Candidate carrying this width check onto that CLI matched the author’s counts for all ten cases, returned 1 for each flagged load and 0 for each exact end. A separate child-error control still returned the disassembler’s exit code 23 and its diagnostic.
|
|
Nothing has happened on this PR for 3 days, so it is marked |
|
No open or merged PR makes the same change. #2668 edits the same script (scripts/re/check_layout.py) to find the right table pointer pair; the shared lines are only the test fixture boilerplate, and the two will conflict lightly. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
The BVH layout checker counted scalar loads as valid whenever their starting offset matched a root parameter, even if the load extended past the packed table. Check the full load width so these reads appear in the report.
What is in it
scripts/re/check_layout.pyreports loads that extend past the root-argument table. The README documents the command.scripts/test_check_layout_bounds.pyexercises a synthetic root signature with three in-bounds loads and two overruns, using mocked disassembly.Tested
Linux x86_64, Python 3.14.4, head
a30bf7667794b4627881d2e6a5510a100ab77f62.python3 -B -m unittest discover -s scripts -p 'test_*.py': 17 passed, 0 failed, 0 skipped. Before the fix, the new test reported both overruns as in bounds.git diff --cached --checkpassed before committing.Windows 11 Pro build 26300, Ryzen 7 7800X3D, Radeon RX 9070 XT (driver 32.0.32029.2010), DXC 1.8.2502.11, Rust 1.100.0 (
x86_64-pc-windows-msvc), debug. Exact heada30bf7667794b4627881d2e6a5510a100ab77f62..\scripts\test.ps1: workspace build passed and the suite reported 776 passed, 0 failed, 41 ignored. The bundled end-to-end title test passed. One runtime GPU skip inside the passing count:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).python -B -m unittest discover -s scripts -p 'test_*.py'on Windows (Python 3.13.15): 17 passed, 0 failed, 0 skipped.python -B scripts/re/check_layout.py <synthetic-shader-dir>used the Windowsxcl disasmexecutable and reported three in-bounds reads and two overruns.Not tested
XCL_SAMPLE_*tests. No sample paths were set.AI use
gpt-6.2-sol) implemented the change and regression test, ran the Linux and Windows checks, and drafted this description.