Loader: keep the cleared TLS callback pointer out of base relocations #4
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4"
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?
Imported from Marvisak/VIctory. Originally posted by Exorion1er on 2026-11-23T22:37:38Z.
What
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
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-23T22:45:21Z.
Good catch, thanks for the PR
victory_gpu::timelinefail-open GPU memory wait timeout immediately precedes title0xc0000005crash (afterretired host resource queueepoch pinning) #2172