GPU: reject overflowing and non-buffer descriptor spans before shadow… #1859
No reviewers
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!1859
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1859"
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?
@VlREX on GitHub · 2026-11-24 23:37 UTC · original
VlREX:fix/checked-buffer-view-spans→main· +71 −15 · 1 files · 1 commits · openUnify checked GPU buffer descriptor span arithmetic across SRV/UAV materialization, bindless address discovery and host bounds validation. Reject arithmetic overflow, empty ranges and incompatible buffer dimensions before shadow lookup. Independent BigInt reference verification: 10,368 cases, zero disagreements. Three Rust regression tests included. Native compilation and GPU validation pending. Complementary to #635 and #402. AI-assisted (ChatGPT).
@upipibi on GitHub · 2026-11-25 00:10 UTC · original
Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at
8c77217:cargo test -p victory-gpu --lockedgives 79 passed, 2 failed, 1 ignored. The two failures are the NVIDIA heap-cap onesmainalso has (descriptor::host::tests::dynamic_slots_are_held_until_releasedandmemory::tests::lists_share_a_table_and_copies_keep_their_views, #1744), so there is nothing new on this hardware. Not run: a title.AI-assisted (Claude Code).
@Marvisak on GitHub · 2026-11-25 07:26 UTC · original · edited 2026-11-25 19:21 UTC
Automated triage for the maintainers.
Merge candidate. This is a recommendation to look, not an approval. It now merges cleanly into
main. CI:checkpassing.The PR adds
checked_view_spanincrates/victory-gpu/src/descriptor/host.rsand uses it inbuffer_range,unordered_range,buffer_srv,buffer_uavandwithin. They now refuse spans whosebase + FirstElement*elementor length overflows. Inmainthat panics in debug builds and wraps to unrelated title memory in release. They also refuse SRV/UAV descriptions whose dimension is not BUFFER before reading theBufferunion member. Placed descriptors come from title memory, so a non-buffer dimension would otherwise be read as FirstElement/NumElements. The existingwithinassertions still hold, and the new tests build their placed views correctly. #2541 makes nearly the same change but covers less (notbuffer_srv/buffer_uavorwithin), so this one is the better of the two.Generated by Claude Code
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.