Loader: keep the cleared TLS callback pointer out of base relocations #4
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!4
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/4/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?
@Exorion1er on GitHub · 2026-11-23 22:37 UTC · original
Exorion1er:fix/tls-callbacks-reloc→main· +58 −0 · 1 files · 1 commits · merged 2026-11-23 22:45 UTCWhat
prepare()clears the TLSAddressOfCallBacksfield but keeps its DIR64 base relocation. If the prepared copy is mapped anywhere but its preferred base, the relocation rewrites the 0 as the rebase delta, and the OS loader then walks a callback array at that bogus address.On Windows this stays hidden because the copy gets 0x140000000. Under Wine/Proton, DYNAMIC_BASE DLLs are mapped high (here at 0x6ffff23c0000), so
LoadLibraryExWfaults inside ntdll before any title code runs.The fix makes that relocation entry
IMAGE_REL_BASED_ABSOLUTE(a no-op);patches_own_test_binarynow asserts that no relocation targets the cleared field.Tested
victory_loader::load; after, the title boots through the first-boot screens, the intro video with sound and the start menus (tested by hand).cargo test -p victory-loader --libunder Wine: 6 passed.Note for Linux/Proton users (no code change)
Past the loader, vkd3d-proton caps shader-visible view heaps at 1,000,000 descriptors by default. GTA VI's heap is 1,245,184 (+65,536 dynamic), so VIctory falls back to the capped heap ("host view heap capped at 1000000") and the GPU page-faults on the first descriptor read past it.
VKD3D_CONFIG=descriptor_heap(vkd3d-proton withVK_EXT_descriptor_heap, e.g. RADV on Mesa 26.2) lifts the cap, and the menus run at 30 fps.🤖 Generated with Claude Code
github-bot referenced this pull request2026-11-26 03:50:40 +00:00
github-bot referenced this pull request2026-11-26 03:55:10 +00:00
github-bot referenced this pull request2026-11-26 04:53:42 +00:00
victory_gpu::timelinefail-open GPU memory wait timeout immediately precedes title0xc0000005crash (afterretired host resource queueepoch pinning) #2174@Marvisak on GitHub · 2026-11-23 22:45 UTC · original
Good catch, thanks for the PR