tests: reserve a fresh preferred base for the relocation-free fixture #1040
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!1040
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1040/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?
@R0Y00 on GitHub · 2026-11-23 22:34 UTC · original
R0Y00:codex/reloc-free-preferred-base→main· +30 −16 · 2 files · 1 commits · merged 2026-11-23 22:53 UTCRefs #77 and #1026.
The Windows /O2 run for #1026 failed in the shared
cpu_native_reloc_freetest before it loaded the image: the fixed preferred address could not be reserved (Win32 487). Each child now reserves a system-selected range, proves the reservation covers the image, and sets that base only in its temporary source-built DLL copy. The free controls release the reservation immediately before native loading. The stripped case now also proves that the image executes when the range is free, and still requires exact Win32 487 and the existing mapper rejection when reserved.Windows 11 26200.9974, MSVC 19.51, Release:
ctest --test-dir out/verify-release --no-tests=error --output-on-failure --repeat until-fail:10 -R '^cpu_native_reloc_free$'passed 10/10. In every run the four relocated calls matched all 249 pairs; the stripped native free and reserved controls and exact pe_map refusal passed. In a separate synthetic setup, pre-reserving the original preferred address made a second fixed reservation fail with Win32 487, while the new setup reserved and encoded a different range.