mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:00:52 +01:00
[PR #650] rdna2spirv: out-of-range s_buffer_load reads safely from heap base without branch (OLD-9916) #691
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#691
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/650
Author: @TanmaySatyam
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:fix/old-9916-smem-oob-safe-address📝 Commits (3)
4c1b8cbrdna2spirv: an out-of-range s_buffer_load is loaded with no branch, from the V# base (llvmpipe segfault)c662c62scalar_load: out of range, the branchless s_buffer_load reads the heap base, not the V# basebf61dd3tests: mark cs_smem_oob_far.asm for regen_fixtures discovery📊 Changes
8 files changed (+317 additions, -28 deletions)
View changed files
📝
docs/design.md(+1 -0)📝
runtime/test/shaders/check.py(+3 -1)➕
runtime/test/shaders/cs_smem_oob_far.asm(+73 -0)📝
scripts/run_gpu_tests.py(+4 -2)➕
tests/semantic/fixtures/disasm/cs_smem_oob_far.s(+55 -0)📝
tests/semantic/test_scalar_mem_smem.py(+19 -1)➕
tests/semantic/test_smem_oob_safe_address.py(+144 -0)📝
tools/rdna2spirv.py(+18 -24)📄 Description
Claimed in the coordination issue as: OLD-9916
AI-assisted.
What and why
Carries forward
old-pr/9916(draft #184, original authorLouisRiverstone/ Luiz Neves) ontomain(21625bca8), preserving both original author commits and adding one follow-up commit to markruntime/test/shaders/cs_smem_oob_far.asmfortests/semantic/regen_fixtures.py(main's marker-based discovery):Luiz Neves): Makes run-time-boundeds_buffer_load*branchless viaOpSelect(in_range, addr, heap_base)so out-of-range dwords read safely from Xbox VA 0 (the always-mapped heap base) and select0, avoiding llvmpipe hoisting loads out ofOpSelectionMergeand segfaulting on >4 GB out-of-range offsets or zero-size descriptors with far bases; addscs_smem_oob_far.asmandtests/semantic/test_smem_oob_safe_address.py.; regen_fixtures:header marker toruntime/test/shaders/cs_smem_oob_far.asmsotests/test_regen_fixtures.pypasses on currentmain.Testing & Verification
vk_compute_test cs_smem_oob_far.spv 1 dump→1 groups x 64: 0 mismatches,out[0..7] = 0 4008636142 0 0 0 4008636142 0 4008636142(0 validation errors).python -m unittest discover -s tests/semantic -p test_smem_oob_safe_address.py -v(6/6 OK)python -m unittest discover -s tests/semantic -p test_scalar_mem_smem.py(44/44 OK)python -I tests/test_regen_fixtures.py(7/7 OK)python -I tests/test_text_write_line_endings.py(3/3 OK)python -I scripts/check_no_game_data.pyexited 0 on all modified/added files.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.