shader: reject raw indexed reads without a proven source stride #2233
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!2233
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2233/head"
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?
@chadhyatt on GitHub · 2026-11-25 06:43 UTC · original
chadhyatt:backport/heap-view-raw-stride→main· +35 −3 · 3 files · 1 commits · merged 2026-11-25 07:06 UTCRefs #2022 and #2174. A formatted heap-view load obtains and validates a dynamic stride. A subsequent raw indexed read must not borrow it: the generic address builder can emit
tid.x * Noneu, because the heap profile excludes a static source stride. Keep the formatted heap helper path and ordinary static-stride raw path distinct.Source-built controls check formatted success, mixed formatted/raw rejection, and static-stride raw success. On base
06913dc1,python3 -B -c 'import sys; sys.path.insert(0,"tests"); import compute_store_check as t; t.read_controls()'fails withExpected rejection: Unsupported read address; ond04a5c4fit passes.python3 -B tests/compute_load_format_check.py controls,python3 -B tests/compute_heap_view_check.py controls,python3 -B tests/compute_heap_store_check.py controls, andpython3 -B tests/compute_store_check.py binary /opt/homebrew/opt/llvm@21/bin/llvm-mc /opt/homebrew/opt/llvm@21/bin/llvm-objcopy /opt/homebrew/opt/llvm@21/lib/libLLVM.dyliball passed on Apple Silicon macOS. Windows GPU readback not run locally; no new hardware or coverage claim.AI-assisted backport patch from x2w-microlift.
@tedin7 on GitHub · 2026-11-25 06:46 UTC · original · reviewed
Review of head
d04a5c4f7c(python-only: tools/compute_store_aot.py, tests/compute_store_check.py, docs/experiments.md).Findings: 0 P1, 0 P2.
Logic: a raw (non-formatted) idxen read with a heap view no longer skips the element-bounds check. Only the formatted heap-view helper (
load_heap_view_format) obtains a runtime stride and bounds the read, so it keeps the dedicated branch. Raw reads fall to the staticsource_stridebranch and are rejected with "Unsupported read address" when no static stride is proven. The accepted formatted path is unchanged. The new test covers: formatted heap-view load accepted, raw read after it rejected, and raw read with a static stride accepted.Commands executed locally:
python3 tests/compute_store_check.py(module-level controls pass up to the argv parse; the draw modes need DXC and run on Windows CI)python3 tests/docs_links_check.py: PASS (417 links)python3 tests/bidi_controls_check.py: PASSgit diff --check origin/main...HEAD: cleanand descriptor_load is not None): new test fails ("Expected rejection: Unsupported read address").offset + read_bytes > source_stridecheck: test fails ("Expected rejection: Read leaves its source element").git checkout -- .after each mutation.No concurrent open PR covers this check. Windows CI job is still pending at review time.
AI-assisted; commands listed were executed locally.