tests: reserve a fresh preferred base for the relocation-free fixture #1040

Manually merged
github merged 1 commit from gh-pr/1040/head into gh-pr/1040/base 2026-11-26 22:37:03 +00:00
Owner

@⁠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 UTC

Refs #77 and #1026.

The Windows /O2 run for #1026 failed in the shared cpu_native_reloc_free test 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.

**@⁠R0Y00** on GitHub · 2026-11-23 22:34 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1040) `R0Y00:codex/reloc-free-preferred-base` → `main` · +30 −16 · 2 files · 1 commits · merged 2026-11-23 22:53 UTC Refs #77 and #1026. The Windows /O2 run for #1026 failed in the shared `cpu_native_reloc_free` test 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:37:01 +00:00
github manually merged commit 6e155ee326 into gh-pr/1040/base 2026-11-26 22:37:03 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.