Windows build 26200 refuses generated low-address test executables with error 623 #1955

Closed
opened 2026-10-09 02:03:28 +00:00 by arcwiser · 9 comments
arcwiser commented 2026-10-09 02:03:28 +00:00 (Migrated from github.com)
Contributor

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 main compiles successfully, but five integration tests cannot start their generated PE executables. Windows returns error 623 (ERROR_ILLEGAL_DLL_RELOCATION):

[WinError 623] {Illegal System DLL Relocation}
The system DLL %hs was relocated in memory. The application will not run properly.
The relocation occurred because the DLL %hs occupied an address range reserved for Windows system DLLs.

The failure is stable when the five tests are rerun serially:

  • windows_dependency_diagnostics: Cannot start diagnostic test: 623
  • windows_address_space: generated executable returns 0xc2 instead of reporting a stack below 0x200000000
  • guest_needed_modules: CreateProcess error 623
  • guest_module_directories: CreateProcess error 623
  • windows_import_modules: CreateProcess error 623

The 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-seh build, Ninja 1.13.2, CMake 4.4.2, Python 3.10.11. Source commit f1451396; the local branch only changes shader decoder diagnostics and does not touch the relinker.

cmake -S . -B build-relinker -G Ninja -DCMAKE_BUILD_TYPE=Release -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON -DCMAKE_CXX_COMPILER=<winlibs-g++.exe>
cmake --build build-relinker --parallel
ctest --test-dir build-relinker --output-on-failure --parallel 4
ctest --test-dir build-relinker --output-on-failure -R "windows_dependency_diagnostics|windows_address_space|guest_needed_modules|guest_module_directories|windows_import_modules"

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.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5771603587 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/1955). Originally posted by [arcwiser](https://github.com/arcwiser) on 2026-10-09T02:03:28Z. --- ### What On Windows NT 10.0.26200.0, a clean relinker-only build from current `main` compiles successfully, but five integration tests cannot start their generated PE executables. Windows returns error 623 (`ERROR_ILLEGAL_DLL_RELOCATION`): ```text [WinError 623] {Illegal System DLL Relocation} The system DLL %hs was relocated in memory. The application will not run properly. The relocation occurred because the DLL %hs occupied an address range reserved for Windows system DLLs. ``` The failure is stable when the five tests are rerun serially: - `windows_dependency_diagnostics`: `Cannot start diagnostic test: 623` - `windows_address_space`: generated executable returns `0xc2` instead of reporting a stack below `0x200000000` - `guest_needed_modules`: `CreateProcess` error 623 - `guest_module_directories`: `CreateProcess` error 623 - `windows_import_modules`: `CreateProcess` error 623 The 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-seh` build, Ninja 1.13.2, CMake 4.4.2, Python 3.10.11. Source commit `f1451396`; the local branch only changes shader decoder diagnostics and does not touch the relinker. ```powershell cmake -S . -B build-relinker -G Ninja -DCMAKE_BUILD_TYPE=Release -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON -DCMAKE_CXX_COMPILER=<winlibs-g++.exe> cmake --build build-relinker --parallel ctest --test-dir build-relinker --output-on-failure --parallel 4 ctest --test-dir build-relinker --output-on-failure -R "windows_dependency_diagnostics|windows_address_space|guest_needed_modules|guest_module_directories|windows_import_modules" ``` 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.
MarcZX10 commented 2026-10-09 02:10:47 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T02:10:47Z.


I traced the generated PE settings in current main: WindowsPeWriter uses ImageBase = 0x140000000, and sets IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE only 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 (or llvm-readobj --file-headers --coff-basereloc) for one failing generated executable and include its ImageBase, 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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6072824314 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/1955#issuecomment-6072824314). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T02:10:47Z. --- I traced the generated PE settings in current `main`: `WindowsPeWriter` uses `ImageBase = 0x140000000`, and sets `IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE` only 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` (or `llvm-readobj --file-headers --coff-basereloc`) for one failing generated executable and include its `ImageBase`, `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.
arcwiser commented 2026-10-09 02:20:41 +00:00 (Migrated from github.com)
Author
Contributor

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 for diagnostic-runner.exe:

Machine/format:          PE32+ x86-64
Characteristics:        0x23 (relocations stripped, executable, large-address-aware)
ImageBase:              0x0000000140000000
AddressOfEntryPoint:    0x000000000003a000
SizeOfImage:            0x0003b000
SizeOfHeaders:          0x00010000
DllCharacteristics:     0x00000100 (NX_COMPAT only; DYNAMIC_BASE is not set)
Base relocation dir:    RVA 0x00000000, size 0x00000000

Sections are mapped from 0x140010000 through 0x14003ade1, so the full image range is 0x140000000..0x14003afff.

The only imported DLL is KERNEL32.dll. Running the preserved executable directly fails in CreateProcess, 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:

{Illegal System DLL Relocation}
The system DLL %hs was relocated in memory. The application will not run properly.
The relocation occurred because the DLL %hs occupied an address range reserved for Windows system DLLs.

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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6072932497 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/1955#issuecomment-6072932497). Originally posted by [arcwiser](https://github.com/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 for `diagnostic-runner.exe`: ``` Machine/format: PE32+ x86-64 Characteristics: 0x23 (relocations stripped, executable, large-address-aware) ImageBase: 0x0000000140000000 AddressOfEntryPoint: 0x000000000003a000 SizeOfImage: 0x0003b000 SizeOfHeaders: 0x00010000 DllCharacteristics: 0x00000100 (NX_COMPAT only; DYNAMIC_BASE is not set) Base relocation dir: RVA 0x00000000, size 0x00000000 ``` Sections are mapped from `0x140010000` through `0x14003ade1`, so the full image range is `0x140000000..0x14003afff`. The only imported DLL is `KERNEL32.dll`. Running the preserved executable directly fails in `CreateProcess`, 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: ``` {Illegal System DLL Relocation} The system DLL %hs was relocated in memory. The application will not run properly. The relocation occurred because the DLL %hs occupied an address range reserved for Windows system DLLs. ``` 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.
MarcZX10 commented 2026-10-09 02:23:22 +00:00 (Migrated from github.com)
Author
Contributor

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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6072967002 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/1955#issuecomment-6072967002). Originally posted by [MarcZX10](https://github.com/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.
arcwiser commented 2026-10-09 02:28:37 +00:00 (Migrated from github.com)
Author
Contributor

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_STRIPPED bit and opened #1958.

Controlled results using otherwise identical copies of the generated runner:

  • changing ImageBase to 0x180000000, 0x100000000, or 0x7ff600000000: still error 623
  • adding DYNAMIC_BASE while leaving RELOCS_STRIPPED: still error 623
  • clearing only RELOCS_STRIPPED: executable starts and reaches the expected missing-import diagnostic
  • clearing RELOCS_STRIPPED and adding DYNAMIC_BASE: also starts

With the writer fix, windows_dependency_diagnostics, guest_needed_modules, guest_module_directories, and windows_import_modules all 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 as 0x2f and 0xfc).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6073029425 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/1955#issuecomment-6073029425). Originally posted by [arcwiser](https://github.com/arcwiser) on 2026-10-09T02:28:37Z. --- I isolated the loader rejection to the COFF `IMAGE_FILE_RELOCS_STRIPPED` bit and opened #1958. Controlled results using otherwise identical copies of the generated runner: - changing `ImageBase` to `0x180000000`, `0x100000000`, or `0x7ff600000000`: still error 623 - adding `DYNAMIC_BASE` while leaving `RELOCS_STRIPPED`: still error 623 - clearing only `RELOCS_STRIPPED`: executable starts and reaches the expected missing-import diagnostic - clearing `RELOCS_STRIPPED` and adding `DYNAMIC_BASE`: also starts With the writer fix, `windows_dependency_diagnostics`, `guest_needed_modules`, `guest_module_directories`, and `windows_import_modules` all 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 as `0x2f` and `0xfc`).
MarcZX10 commented 2026-10-09 02:33:24 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T02:33:24Z.


I traced the remaining stack result against the current GuestArena implementation. On Windows, Arena() walks the range from 0x2_0000_0000 to 0xFC00_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_space test only executes a standalone relinked fixture and asserts its stack high dword is below 8 GiB; it does not initialize GuestArena or 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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6073078208 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/1955#issuecomment-6073078208). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T02:33:24Z. --- I traced the remaining stack result against the current `GuestArena` implementation. On Windows, `Arena()` walks the range from `0x2_0000_0000` to `0xFC00_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_space` test only executes a standalone relinked fixture and asserts its stack high dword is below 8 GiB; it does not initialize `GuestArena` or 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.
ryyReid commented 2026-10-09 05:59:08 +00:00 (Migrated from github.com)
Author
Contributor

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, commit f1451396. 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 are RELOCS_STRIPPED and 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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6075253322 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/1955#issuecomment-6075253322). Originally posted by [ryyReid](https://github.com/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, commit `f1451396`. 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 are `RELOCS_STRIPPED` and 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.
boehla commented 2026-10-09 06:44:57 +00:00 (Migrated from github.com)
Author
Contributor

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 120 as in CI:

tree result
main f1451396 36/36 passed
#1958 6633f700 36/36 passed

On main, diagnostic-runner.exe has the headers from the report (Characteristics 0x23 with RELOCS_STRIPPED, ImageBase 0x140000000, DllCharacteristics 0x100, no relocation directory) and starts normally. Get-ProcessMitigation -System here reports ForceRelocateImages, RequireInfo, BottomUp and HighEntropy as NOTSET.

Two additions to the exploit-protection explanation above:

  1. Mandatory ASLR alone still loads a relocation-stripped image at its preferred base. The sub-option "Do not allow stripped images" (RequireInfo) is what refuses it (Exploit protection reference). So the values to check on the failing machine are RequireInfo together with ForceRelocateImages.
  2. The remaining windows_address_space failure 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 dwords 0x2f and 0xfc both lie below 0x100, inside that range. Here, with BottomUp and HighEntropy at NOTSET, rsp >> 32 was 0 in 20 of 20 runs of that test's executable, on main and on #1958.

@arcwiser, the ASLR section of Get-ProcessMitigation -System on 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, and RELOCS_STRIPPED marked 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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6075862495 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/1955#issuecomment-6075862495). Originally posted by [boehla](https://github.com/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 120` as in CI: | tree | result | |---|---| | `main` `f1451396` | 36/36 passed | | #1958 `6633f700` | 36/36 passed | On `main`, `diagnostic-runner.exe` has the headers from the report (Characteristics `0x23` with `RELOCS_STRIPPED`, ImageBase `0x140000000`, DllCharacteristics `0x100`, no relocation directory) and starts normally. `Get-ProcessMitigation -System` here reports `ForceRelocateImages`, `RequireInfo`, `BottomUp` and `HighEntropy` as `NOTSET`. Two additions to the exploit-protection explanation above: 1. Mandatory ASLR alone still loads a relocation-stripped image at its preferred base. The sub-option "Do not allow stripped images" (`RequireInfo`) is what refuses it ([Exploit protection reference](https://learn.microsoft.com/defender-endpoint/exploit-protection-reference#force-randomization-for-images-mandatory-aslr)). So the values to check on the failing machine are `RequireInfo` together with `ForceRelocateImages`. 2. The remaining `windows_address_space` failure 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](https://learn.microsoft.com/defender-endpoint/exploit-protection-reference#randomize-memory-allocations-bottom-up-aslr)). The reported stack high dwords `0x2f` and `0xfc` both lie below `0x100`, inside that range. Here, with `BottomUp` and `HighEntropy` at `NOTSET`, `rsp >> 32` was `0` in 20 of 20 runs of that test's executable, on `main` and on #1958. @arcwiser, the ASLR section of `Get-ProcessMitigation -System` on 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, and `RELOCS_STRIPPED` marked 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.
arcwiser commented 2026-10-10 01:32:48 +00:00 (Migrated from github.com)
Author
Contributor

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 -System reports:

OverrideForceRelocateImages : False
OverrideBottomUp            : False
OverrideHighEntropy         : False
ForceRelocateImages         : NOTSET
RequireInfo                 : NOTSET
BottomUp                    : NOTSET
HighEntropy                 : NOTSET

The system MitigationOptions and MitigationAuditOptions registry values are also blank, and there are no per-image IFEO entries for diagnostic-runner.exe, output.exe, or relinker.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 clearing IMAGE_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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6092218934 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/1955#issuecomment-6092218934). Originally posted by [arcwiser](https://github.com/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 -System` reports: ```text OverrideForceRelocateImages : False OverrideBottomUp : False OverrideHighEntropy : False ForceRelocateImages : NOTSET RequireInfo : NOTSET BottomUp : NOTSET HighEntropy : NOTSET ``` The system `MitigationOptions` and `MitigationAuditOptions` registry values are also blank, and there are no per-image IFEO entries for `diagnostic-runner.exe`, `output.exe`, or `relinker.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 clearing `IMAGE_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.
boehla commented 2026-10-10 06:35:21 +00:00 (Migrated from github.com)
Author
Contributor

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 CreateProcess through PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY, and no system setting was changed. Same machine as above (10.0.26200.8875, everything NOTSET system-wide).

diagnostic-runner.exe, launched directly:

process policy main 00112489 (RELOCS_STRIPPED) #1958 a18955ee
none starts at 0x140000000 starts at 0x140000000
ForceRelocateImages starts at 0x140000000 starts, rebased to 0x10000
ForceRelocateImages + RequireInfo CreateProcess error 623 starts, rebased to 0x10000
BottomUp + HighEntropy starts at 0x140000000 starts at 0x140000000

Wherever it starts, the exit status is the same as without a policy.

windows_address_space executable (DllCharacteristics 0x140), 10 runs per row, exit code = rsp >> 32:

process policy values >= 8 GiB
none 0x0 0/10
ForceRelocateImages + RequireInfo 0x0 0/10
BottomUp + HighEntropy 0x4 … 0xf7 10/10

So 623 appears exactly when RequireInfo is in effect for the process. That also matches your four controlled variants: a different ImageBase or DYNAMIC_BASE did not help, and clearing only RELOCS_STRIPPED did. The high stack values (0x2f, 0xfc in your runs) appear exactly when high-entropy ASLR is forced (HighEntropy alone is enough; BottomUp alone gives 0x0).

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, only windows_address_space fails (35/36).

These per-process policies do not show up in Get-ProcessMitigation -System or IFEO. They are also not inherited through a plain CreateProcess: a cmd.exe started 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. Here ForceRelocateImages and RequireInfo are ON for a process started with the policy and OFF without it. BottomUp and HighEntropy show ON for powershell.exe even without a policy, so they don't tell anything.
  • The five tests from a plain PowerShell outside the sandbox.

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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6094705126 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/1955#issuecomment-6094705126). Originally posted by [boehla](https://github.com/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 `CreateProcess` through `PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY`, and no system setting was changed. Same machine as above (10.0.26200.8875, everything `NOTSET` system-wide). `diagnostic-runner.exe`, launched directly: | process policy | `main` 00112489 (`RELOCS_STRIPPED`) | #1958 a18955ee | |---|---|---| | none | starts at `0x140000000` | starts at `0x140000000` | | `ForceRelocateImages` | starts at `0x140000000` | starts, rebased to `0x10000` | | `ForceRelocateImages` + `RequireInfo` | **`CreateProcess` error 623** | starts, rebased to `0x10000` | | `BottomUp` + `HighEntropy` | starts at `0x140000000` | starts at `0x140000000` | Wherever it starts, the exit status is the same as without a policy. `windows_address_space` executable (DllCharacteristics `0x140`), 10 runs per row, exit code = `rsp >> 32`: | process policy | values | >= 8 GiB | |---|---|---| | none | `0x0` | 0/10 | | `ForceRelocateImages` + `RequireInfo` | `0x0` | 0/10 | | `BottomUp` + `HighEntropy` | `0x4` … `0xf7` | **10/10** | So 623 appears exactly when `RequireInfo` is in effect for the process. That also matches your four controlled variants: a different ImageBase or `DYNAMIC_BASE` did not help, and clearing only `RELOCS_STRIPPED` did. The high stack values (`0x2f`, `0xfc` in your runs) appear exactly when high-entropy ASLR is forced (`HighEntropy` alone is enough; `BottomUp` alone gives `0x0`). 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, only `windows_address_space` fails (35/36). These per-process policies do not show up in `Get-ProcessMitigation -System` or IFEO. They are also not inherited through a plain `CreateProcess`: a `cmd.exe` started 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. Here `ForceRelocateImages` and `RequireInfo` are `ON` for a process started with the policy and `OFF` without it. `BottomUp` and `HighEntropy` show `ON` for `powershell.exe` even without a policy, so they don't tell anything. - The five tests from a plain PowerShell outside the sandbox. 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.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#1955
No description provided.