loader: support multi-region clzero stub reach and checked RVA arithmetic #80
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: launcher
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
run report
security: hold
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs gpu test
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/Androtim--MiniVI!80
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/80/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?
@Androtim on GitHub · 2026-11-29 05:17 UTC · original
Androtim:feat/iter81-loader-hardening→main· +153 −15 · 2 files · 1 commits · merged 2026-11-29 06:05 UTCSummary
Adapted from upstream \VIctory-NVIDIA\ PRs #572 and #91 (GPL-3.0), extracted cleanly off \origin/main\ with zero overlap against other open PRs:
Verification
elocation_targets_past_the_top_of_the_rva_space_are_skipped, and \ ls_directory_at_the_top_of_the_rva_space_is_prepared)
@Androtim on GitHub · 2026-11-29 06:02 UTC · original
Automated triage for the maintainers (not an approval).
Verdict:
merge-candidate· CI (check):passingReview Summary
Clean, well-scoped loader changes with passing CI and targeted unit tests covering both fixes:
crates/victory-loader/src/console_insn.rs(STUBS,patch_clzero):Option<(usize, usize)>stub region withVec<(usize, usize)>properly handlesclzeroloops separated by more than 2 GiB (beyondjmp rel32reach of an earlier region) by selecting the first reachable region with room or allocating a new one vianear(at).(at & 15) + 5 > 16andclzero_stub(at, at, [x, y, z]).is_none()before lockingSTUBSor callingnear(at)avoids unnecessary allocations for unpatchable sites.clzero_loops_far_apart_are_each_replacedexercises patching and executing loops allocated >4 GiB apart (VirtualAlloclow +MEM_TOP_DOWNhigh).crates/victory-loader/src/prepare.rs(prepare,dir64_relocations):u32additions tochecked_addfortls.directory_rva + TLS64_ADDRESS_OF_CALLBACKSandpage + (e & 0xFFF)prevents debug overflow panics and release wrap-around on malformed RVAs nearu32::MAX.relocation_targets_past_the_top_of_the_rva_space_are_skippedandtls_directory_at_the_top_of_the_rva_space_is_prepared.No GPU/shader/host rendering paths are touched, and there is no overlap with other open PRs. Ready as a merge candidate (pending maintainer review).
Generated with Antigravity CLI (
agy).