Windows build 26200 refuses generated low-address test executables with error 623 #1955
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 boykopovar/AnyPS5. Originally posted by arcwiser on 2026-10-09T02:03:28Z.
What
On Windows NT 10.0.26200.0, a clean relinker-only build from current
maincompiles successfully, but five integration tests cannot start their generated PE executables. Windows returns error 623 (ERROR_ILLEGAL_DLL_RELOCATION):The failure is stable when the five tests are rerun serially:
windows_dependency_diagnostics:Cannot start diagnostic test: 623windows_address_space: generated executable returns0xc2instead of reporting a stack below0x200000000guest_needed_modules:CreateProcesserror 623guest_module_directories:CreateProcesserror 623windows_import_modules:CreateProcesserror 623The other 31 relinker-only tests pass. No existing issue matched error 623 or this test set.
Reproduction
Toolchain: the documented WinLibs MinGW-w64 GCC 15.2.0
x86_64-ucrt-posix-sehbuild, Ninja 1.13.2, CMake 4.4.2, Python 3.10.11. Source commitf1451396; the local branch only changes shader decoder diagnostics and does not touch the relinker.This may be a Windows 11 Insider/build-26200 address-space reservation change rather than a relinker regression. Reporting it before changing image layout because these tests intentionally constrain generated addresses.
AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T02:10:47Z.
I traced the generated PE settings in current
main:WindowsPeWriterusesImageBase = 0x140000000, and setsIMAGE_DLLCHARACTERISTICS_DYNAMIC_BASEonly when the base-relocation directory is nonempty. The failing integration fixtures execute PE files built with this writer. That makes an image-base collision a plausible cause for error 623, but the report does not include the headers of the exact failing output, so I can't yet tell whether this is a test-fixture issue or affects normal relinked executables too.Could you capture
dumpbin /headers(orllvm-readobj --file-headers --coff-basereloc) for one failing generated executable and include itsImageBase,DllCharacteristics, base-relocation directory RVA/size, and the system DLL named in the error? Microsoft's PE documentation says the loader applies base relocations when an image cannot load at its preferred base: https://learn.microsoft.com/windows/win32/debug/pe-format#the-reloc-section-image-only.Imported from boykopovar/AnyPS5. Originally posted by arcwiser on 2026-10-09T02:20:41Z.
I preserved the generated failing runner and inspected it with GNU objdump 2.45 (
objdump -x). Here are the requested PE fields fordiagnostic-runner.exe:Sections are mapped from
0x140010000through0x14003ade1, so the full image range is0x140000000..0x14003afff.The only imported DLL is
KERNEL32.dll. Running the preserved executable directly fails inCreateProcess, before the generated entry point can execute, with error 623.Unfortunately Windows does not substitute either DLL name in the error on this machine. PowerShell reports the OS message literally as:
So there is no system DLL name available in the emitted diagnostic to include. This is on Windows NT 10.0.26200.0. The fixed image base itself is the conventional x64 executable base, and the image does not claim
DYNAMIC_BASE, which makes the loader rejection surprising. I can preserve/run further variants if you want a specific header bit or image base changed for comparison.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T02:23:22Z.
The PE fields narrow this to a fixed-base collision hypothesis: the COFF header marks IMAGE_FILE_RELOCS_STRIPPED and the base-relocation directory is empty. Microsoft documents that such images must load at the preferred base and the loader reports an error if that address is unavailable: https://learn.microsoft.com/windows/win32/debug/pe-format#characteristics
Could you run one controlled variant of diagnostic-runner.exe with only ImageBase changed from 0x140000000 to 0x180000000, leaving RVAs, section data, and flags unchanged, and report whether CreateProcess starts it? The runner uses RIP-relative code and an IAT, so this should isolate whether 0x140000000 is the unavailable/reserved range on build 26200. If the result is unchanged, we can investigate the Windows mitigation policy next.
Imported from boykopovar/AnyPS5. Originally posted by arcwiser on 2026-10-09T02:28:37Z.
I isolated the loader rejection to the COFF
IMAGE_FILE_RELOCS_STRIPPEDbit and opened #1958.Controlled results using otherwise identical copies of the generated runner:
ImageBaseto0x180000000,0x100000000, or0x7ff600000000: still error 623DYNAMIC_BASEwhile leavingRELOCS_STRIPPED: still error 623RELOCS_STRIPPED: executable starts and reaches the expected missing-import diagnosticRELOCS_STRIPPEDand addingDYNAMIC_BASE: also startsWith the writer fix,
windows_dependency_diagnostics,guest_needed_modules,guest_module_directories, andwindows_import_modulesall pass. The full relinker suite is now 35/36 instead of 31/36.The sole remaining failure,
windows_address_space, is now a distinct post-launch issue: the executable runs, but Windows 10.0.26200.0 creates its initial stack above the 8 GiB guest-arena boundary (observed high-word exit values such as0x2fand0xfc).Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T02:33:24Z.
I traced the remaining stack result against the current
GuestArenaimplementation. On Windows,Arena()walks the range from0x2_0000_0000to0xFC00_000000, records pre-existing mappings as_hostRegions/_holes, and puts those ranges in_used, so allocation skips them. A stack above 8 GiB therefore appears to reduce guest-arena capacity, but it is not by itself evidence that arena initialization or guest execution fails.The current
windows_address_spacetest only executes a standalone relinked fixture and asserts its stack high dword is below 8 GiB; it does not initializeGuestArenaor measure a failed guest mapping. Could you confirm whether Windows 26200 also causes an actual emulator/guest allocation regression, or is the remaining failure only this stack-placement assumption? That will distinguish a runtime issue from a test that encodes the earlier placement workaround.Imported from boykopovar/AnyPS5. Originally posted by ryyReid on 2026-10-09T05:59:08Z.
Data point from another build-26200 machine where this does not reproduce: Windows 11 Pro 25H2, 10.0.26200.9457, same WinLibs GCC 15.2.0 r7 (
x86_64-ucrt-posix-seh), Ninja 1.13.2, CMake 4.3.1, Python 3.13.9, commitf1451396. The relinker-only build passes 36/36, including all five tests listed here; the full build passes them too.System exploit protection here has Mandatory ASLR off (
Get-ProcessMitigation -System→ASLR.ForceRelocateImages: NOTSET). Since the failing images areRELOCS_STRIPPEDand clearing that bit fixes them, could you check whether "Force randomization for images (Mandatory ASLR)" is on in Windows Security → Exploit protection on the failing machine? That would make this configuration-dependent rather than build-26200-specific, and #1958 the right fix either way.Imported from boykopovar/AnyPS5. Originally posted by boehla on 2026-10-09T06:44:57Z.
Third build-26200 machine, also not reproducible: Windows 11 Pro 25H2, 10.0.26200.8875, WinLibs GCC 15.2.0 r7 (SHA-256 checked against the release digest), CMake 4.3.1, Ninja 1.13.2, Python 3.12. Relinker-only Release build,
ctest --output-on-failure --timeout 120as in CI:mainf14513966633f700On
main,diagnostic-runner.exehas the headers from the report (Characteristics0x23withRELOCS_STRIPPED, ImageBase0x140000000, DllCharacteristics0x100, no relocation directory) and starts normally.Get-ProcessMitigation -Systemhere reportsForceRelocateImages,RequireInfo,BottomUpandHighEntropyasNOTSET.Two additions to the exploit-protection explanation above:
RequireInfo) is what refuses it (Exploit protection reference). So the values to check on the failing machine areRequireInfotogether withForceRelocateImages.windows_address_spacefailure fits the same configuration. Bottom-up ASLR with high entropy adds up to 1 TB of variance to bottom-up allocations of 64-bit processes (same reference). The reported stack high dwords0x2fand0xfcboth lie below0x100, inside that range. Here, withBottomUpandHighEntropyatNOTSET,rsp >> 32was0in 20 of 20 runs of that test's executable, onmainand on #1958.@arcwiser, the ASLR section of
Get-ProcessMitigation -Systemon the failing machine would confirm or rule out both points.For #1958: the writers leave out the relocation directory only when the relocation list is empty (
WindowsPePatcher.cpp:102-105,WindowsGuestModuleWriter.cpp:165-168). Such an image has no absolute addresses to fix up, so it can be rebased, andRELOCS_STRIPPEDmarked it non-relocatable without need. This is from reading the code, not tested with the mitigation enabled.AI-assisted: yes (Claude Code). Logs available on request.
Imported from boykopovar/AnyPS5. Originally posted by arcwiser on 2026-10-10T01:32:48Z.
I checked the exact process-mitigation settings on the Windows 11 build 26200 machine where the generated executable fails.
Get-ProcessMitigation -Systemreports:The system
MitigationOptionsandMitigationAuditOptionsregistry values are also blank, and there are no per-image IFEO entries fordiagnostic-runner.exe,output.exe, orrelinker.exe.So the loader failure and the high-stack observation reproduce without Mandatory ASLR, bottom-up ASLR, or high-entropy ASLR being forced by system or per-image policy. That rules out the proposed mitigation-policy explanation for this machine.
I also rebased #1958 onto current
main, broadened its wording to cover the ordinary zero-relocation guest-module path, and reran the relinker build and focused Windows tests. The controlled one-bit PE experiment still supports clearingIMAGE_FILE_RELOCS_STRIPPED: the otherwise identical image starts once that characteristic is cleared. This makes generated zero-relocation images loadable, but it does not by itself prove an actual GuestArena allocation regression. So far, the only address-space regression demonstrated here is the test's obsolete low-stack assumption; I have not claimed a failing game/runtime GuestArena allocation.Imported from boykopovar/AnyPS5. Originally posted by boehla on 2026-10-10T06:35:21Z.
For the record, now that this is closed: thanks for checking, that rules out system and IFEO policy on your machine. I reproduced both symptoms here with the same mitigations applied per process instead: they were passed to
CreateProcessthroughPROC_THREAD_ATTRIBUTE_MITIGATION_POLICY, and no system setting was changed. Same machine as above (10.0.26200.8875, everythingNOTSETsystem-wide).diagnostic-runner.exe, launched directly:main00112489(RELOCS_STRIPPED)a18955ee0x1400000000x140000000ForceRelocateImages0x1400000000x10000ForceRelocateImages+RequireInfoCreateProcesserror 6230x10000BottomUp+HighEntropy0x1400000000x140000000Wherever it starts, the exit status is the same as without a policy.
windows_address_spaceexecutable (DllCharacteristics0x140), 10 runs per row, exit code =rsp >> 32:0x0ForceRelocateImages+RequireInfo0x0BottomUp+HighEntropy0x4…0xf7So 623 appears exactly when
RequireInfois in effect for the process. That also matches your four controlled variants: a different ImageBase orDYNAMIC_BASEdid not help, and clearing onlyRELOCS_STRIPPEDdid. The high stack values (0x2f,0xfcin your runs) appear exactly when high-entropy ASLR is forced (HighEntropyalone is enough;BottomUpalone gives0x0).Injecting the same policies into every process the tests start reproduces your whole ctest result on
f1451396: exactly these five tests fail with the same messages (31/36). With the #1958 diff applied, onlywindows_address_spacefails (35/36).These per-process policies do not show up in
Get-ProcessMitigation -Systemor IFEO. They are also not inherited through a plainCreateProcess: acmd.exestarted with them launched both executables normally. So on the failing machine something would have to apply them to each process it starts. The sandbox you mention, or a security product, would fit. Two quick checks:powershell -NoProfile -Command '(Get-ProcessMitigation -Id $PID).ASLR'from the shell where ctest runs, so a newly started child is checked. HereForceRelocateImagesandRequireInfoareONfor a process started with the policy andOFFwithout it.BottomUpandHighEntropyshowONforpowershell.exeeven without a policy, so they don't tell anything.This doesn't change the case for #1958 (now merged): it starts under every policy above and behaves the same. For
windows_address_space, this suggests the low-stack assumption still holds on a default 26200 configuration (here and in @ryyReid's run) and fails under forced high-entropy ASLR. Whether the test should tolerate that is a separate question.AI-assisted: yes (Claude Code). The probe (~145 lines of Python/ctypes) and the ctest harness are available if useful.