cpu: reproduce load-config dispatch callback behavior #907

Merged
triggered02 merged 4 commits from upstream-pr/914 into main 2026-11-23 18:22:22 +00:00
triggered02 commented 2026-11-23 16:59:00 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-23T16:59:00Z.


Refs #903 and #870. Source-built fixtures only; no production pe_map or loader change.

Change

Two source-built cases:

  • cpu_native_load_dispatch uses a hand-written 0x138-byte _load_config_used. The +0x78 field is treated as the fixture's own direct callback pointer, not the real Windows guard-dispatch ABI. It is in read-only .rdata with a DIR64 relocation; present/absent/alternate callbacks exercise the count, argument and return.
  • cpu_native_load_config_callback builds a C++ caller with /guard:cf. The linker supplies the guard slots, function table and flags; the caller calls a read-only relocated callback table through __guard_dispatch_icall_fptr. record, other (different callback) and invalid (target inside a function) link without CFG; cfg_record and cfg_invalid link with it. The fixture is based on denn0x's pe/load-config-callback reference branch.

The hand-built fixture inspects its PE for the load-config directory/structure sizes, slot RVA/value, read-only .rdata, and DIR64 relocation. The CFG fixture checks the guard slots, function table, flags, slot page protection and dispatch-call sites. Both run under Windows and pe_map with cpu_exe_io.dll.

Verification

Windows 11 Pro 26200, MSVC 19.52, CMake/Ninja, Ryzen 5 5500. CPU-only; no adapter or debug layer.

ctest --preset dev --no-tests=error -R '^cpu_native_load_(dispatch|config_callback)$' -V

Dev: hand-built present/absent/alternate native and mapped 0xb111 / 0xb211 / 0xb151. Linker fixture: record / other / invalid match; cfg_record Windows 0x30055 (both slots replaced) vs pe_map 0x55 (own slots kept); cfg_invalid Windows ends before output (0xc0000409 locally) vs pe_map 0x77 (unchecked target). 2.07 s.

ctest --preset release --no-tests=error -R '^cpu_native_load_(dispatch|config_callback)$' -V

Release: same results, 2.03 s.

python -B tests/docs_links_check.py (13 files, 179 links), python -B tests/bidi_controls_check.py (748 files) and git diff --check pass.

Evidence and follow-up

  • The hand-built +0x78 field is the fixture's own callback convention; it does not establish the real guard-dispatch ABI.
  • The malformed hand-built GuardFlags=0x100 image (no check pointer or function table) is not part of the test or an acceptance condition. It was locally refused and hung the CI runner; a specific refusal code is not portable. The docs mention it separately.
  • The linker-produced CFG fixture records Windows validation and the current pe_map support boundary. The fast-fail code is printed but not asserted.
  • No title behavior and no production loader change. Credit to denn0x's reference branch.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed.
  • I did not include game files, dumps, distribution links or secrets.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6564431289 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/914). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-23T16:59:00Z. --- Refs #903 and #870. Source-built fixtures only; no production `pe_map` or loader change. ## Change Two source-built cases: - `cpu_native_load_dispatch` uses a hand-written 0x138-byte `_load_config_used`. The +0x78 field is treated as the fixture's own direct callback pointer, not the real Windows guard-dispatch ABI. It is in read-only `.rdata` with a DIR64 relocation; present/absent/alternate callbacks exercise the count, argument and return. - `cpu_native_load_config_callback` builds a C++ caller with `/guard:cf`. The linker supplies the guard slots, function table and flags; the caller calls a read-only relocated callback table through `__guard_dispatch_icall_fptr`. `record`, `other` (different callback) and `invalid` (target inside a function) link without CFG; `cfg_record` and `cfg_invalid` link with it. The fixture is based on denn0x's `pe/load-config-callback` reference branch. The hand-built fixture inspects its PE for the load-config directory/structure sizes, slot RVA/value, read-only `.rdata`, and DIR64 relocation. The CFG fixture checks the guard slots, function table, flags, slot page protection and dispatch-call sites. Both run under Windows and `pe_map` with `cpu_exe_io.dll`. ## Verification Windows 11 Pro 26200, MSVC 19.52, CMake/Ninja, Ryzen 5 5500. CPU-only; no adapter or debug layer. ```powershell ctest --preset dev --no-tests=error -R '^cpu_native_load_(dispatch|config_callback)$' -V ``` Dev: hand-built present/absent/alternate native and mapped `0xb111` / `0xb211` / `0xb151`. Linker fixture: `record` / `other` / `invalid` match; `cfg_record` Windows `0x30055` (both slots replaced) vs `pe_map` `0x55` (own slots kept); `cfg_invalid` Windows ends before output (`0xc0000409` locally) vs `pe_map` `0x77` (unchecked target). 2.07 s. ```powershell ctest --preset release --no-tests=error -R '^cpu_native_load_(dispatch|config_callback)$' -V ``` Release: same results, 2.03 s. `python -B tests/docs_links_check.py` (13 files, 179 links), `python -B tests/bidi_controls_check.py` (748 files) and `git diff --check` pass. ## Evidence and follow-up - The hand-built +0x78 field is the fixture's own callback convention; it does not establish the real guard-dispatch ABI. - The malformed hand-built `GuardFlags=0x100` image (no check pointer or function table) is not part of the test or an acceptance condition. It was locally refused and hung the CI runner; a specific refusal code is not portable. The docs mention it separately. - The linker-produced CFG fixture records Windows validation and the current `pe_map` support boundary. The fast-fail code is printed but not asserted. - No title behavior and no production loader change. Credit to denn0x's reference branch. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [x] I updated README/docs when a capability or build requirement changed. - [x] I did not include game files, dumps, distribution links or secrets. AI-assisted.
upstream-sync closed this pull request 2026-11-24 06:45:23 +00:00
denn0x commented 2026-11-24 06:45:23 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-23T17:05:00Z.

Review: COMMENTED


Independent review of ff3c29f, as requested in #903.

Environment: Windows 11 build 26300.9974, AMD Ryzen 7 7700, MSVC 19.50.35720 (link 14.50), Python 3.13. CPU only.

Reproduction. In a fresh worktree, I ran ctest --preset dev --no-tests=error -R '^cpu_native_load_dispatch$' -V and the same with --preset release. Both pass, with the PR's numbers exactly:

Variant Native Mapped
present 0xb111 0xb111
absent 0xb211 0xb211
alternate 0xb151 0xb151
cfg refused before entry, 0xc000003e 0xb111

PE fields, read with my own pefile script rather than the PR's checker. These agree with the test output.

present absent alternate cfg
DllCharacteristics 0x8160 0x8160 0x8160 0xc160 (GUARD_CF)
Load-config Size / directory size 0x138 / 0x138 same same same
+0x78 field RVA 0x2088 0x2088 0x2088 0x2098
DIR64 relocation on the field yes no yes yes
+0x78 value (preferred base) 0x140001000 (.text) 0 0x140001014 (.text) 0x140001000 (.text)
GuardCFCheckFunctionPointer 0 0 0 0
Function count / GuardFlags 0 / 0x0 0 / 0x0 0 / 0x0 0 / 0x100

The call count and the argument (0x1234) matched on both loaders. The alternate control changes the result bits (0x40) and the return value as intended.

Where the CFG refusal comes from. I patched copies of the cfg image:

  • +0x78 set to 0, GuardFlags kept at 0x100: still 0xc000003e.
  • GuardFlags set to 0, +0x78 kept: runs, 0xb111.

So the refusal comes from GuardFlags = 0x100 on a GUARD_CF image that has no check pointer and no function table. It does not depend on the dispatch field. The docs could say that, so it isn't read as Windows validating the callback.

One design point. GuardCFDispatchFunctionPointer is the VA of a pointer slot, __guard_dispatch_icall_fptr. The loader writes its dispatcher into that slot, and /guard:cf code puts the target in RAX and does call [slot]. Without CFG, the slot holds a jmp rax stub. In this fixture the field itself holds the callback's address in .text, and the entry calls that value directly. The fixture therefore tests "a callback pointer stored in the load-config field", which both loaders handle the same way. It does not test the dispatch path:

  • With a linker-built CFG load config, Windows replaced the slot contents before entry in the measurements I posted in #903.
  • With this layout, a valid CFG build would point the loader at the callback's code bytes rather than at a slot. I did not test that, because this config is refused first.

Two options: a short note in the docs and PR body naming what the fixture models, or the compiled shape. In the compiled shape, a separate read-only, relocated slot holds a jmp rax stub and the field points at it; the callback address comes from a read-only table, and a C++ caller built with /guard:cf makes the call. I have a tested local version of that shape and can share it as a branch if useful, but I'd leave the choice to you and the maintainer.

Your open question. I'd keep the linker-emitted CFG build separate, as the maintainer asked. For reference, on link 14.50 MASM-only objects never get IMAGE_GUARD_CF_INSTRUMENTED. At least one object compiled with /guard:cf is needed before Windows applies the guard slots. Details are in #903.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6025877043 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/914#pullrequestreview-6025877043). Originally posted by [denn0x](https://github.com/denn0x) on 2026-11-23T17:05:00Z. **Review:** COMMENTED --- Independent review of `ff3c29f`, as requested in #903. **Environment:** Windows 11 build 26300.9974, AMD Ryzen 7 7700, MSVC 19.50.35720 (link 14.50), Python 3.13. CPU only. **Reproduction.** In a fresh worktree, I ran `ctest --preset dev --no-tests=error -R '^cpu_native_load_dispatch$' -V` and the same with `--preset release`. Both pass, with the PR's numbers exactly: | Variant | Native | Mapped | | --- | --- | --- | | present | `0xb111` | `0xb111` | | absent | `0xb211` | `0xb211` | | alternate | `0xb151` | `0xb151` | | cfg | refused before entry, `0xc000003e` | `0xb111` | **PE fields, read with my own pefile script rather than the PR's checker.** These agree with the test output. | | present | absent | alternate | cfg | | --- | --- | --- | --- | --- | | DllCharacteristics | `0x8160` | `0x8160` | `0x8160` | `0xc160` (`GUARD_CF`) | | Load-config `Size` / directory size | `0x138` / `0x138` | same | same | same | | `+0x78` field RVA | `0x2088` | `0x2088` | `0x2088` | `0x2098` | | DIR64 relocation on the field | yes | no | yes | yes | | `+0x78` value (preferred base) | `0x140001000` (`.text`) | 0 | `0x140001014` (`.text`) | `0x140001000` (`.text`) | | `GuardCFCheckFunctionPointer` | 0 | 0 | 0 | 0 | | Function count / `GuardFlags` | 0 / `0x0` | 0 / `0x0` | 0 / `0x0` | 0 / `0x100` | The call count and the argument (`0x1234`) matched on both loaders. The alternate control changes the result bits (`0x40`) and the return value as intended. **Where the CFG refusal comes from.** I patched copies of the `cfg` image: - `+0x78` set to 0, `GuardFlags` kept at `0x100`: still `0xc000003e`. - `GuardFlags` set to 0, `+0x78` kept: runs, `0xb111`. So the refusal comes from `GuardFlags = 0x100` on a `GUARD_CF` image that has no check pointer and no function table. It does not depend on the dispatch field. The docs could say that, so it isn't read as Windows validating the callback. **One design point.** `GuardCFDispatchFunctionPointer` is the VA of a pointer slot, `__guard_dispatch_icall_fptr`. The loader writes its dispatcher into that slot, and `/guard:cf` code puts the target in RAX and does `call [slot]`. Without CFG, the slot holds a `jmp rax` stub. In this fixture the field itself holds the callback's address in `.text`, and the entry calls that value directly. The fixture therefore tests "a callback pointer stored in the load-config field", which both loaders handle the same way. It does not test the dispatch path: - With a linker-built CFG load config, Windows replaced the slot contents before entry in the measurements I posted in #903. - With this layout, a valid CFG build would point the loader at the callback's code bytes rather than at a slot. I did not test that, because this config is refused first. Two options: a short note in the docs and PR body naming what the fixture models, or the compiled shape. In the compiled shape, a separate read-only, relocated slot holds a `jmp rax` stub and the field points at it; the callback address comes from a read-only table, and a C++ caller built with `/guard:cf` makes the call. I have a tested local version of that shape and can share it as a branch if useful, but I'd leave the choice to you and the maintainer. **Your open question.** I'd keep the linker-emitted CFG build separate, as the maintainer asked. For reference, on link 14.50 MASM-only objects never get `IMAGE_GUARD_CF_INSTRUMENTED`. At least one object compiled with `/guard:cf` is needed before Windows applies the guard slots. Details are in #903. _AI-assisted (Claude Code)._
chatgpt-codex-connector[bot commented 2026-11-24 06:49:21 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-23T16:59:12Z.


Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T17:01:25.103460Z ff3c29f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7107977015 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/914#issuecomment-7107977015). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-23T16:59:12Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"ff3c29fa98cb04eaf6802f080107a0e86443a930","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-23T17:01:25.103460Z">2026-11-23T17:01:25.103460Z</relative-time> | `ff3c29f` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
R0Y00 commented 2026-11-24 06:49:21 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T17:02:02Z.


Thanks for the first source-built comparison. The three synthetic callback traces give us useful absent/present/alternate controls. Please describe the hand-written field as the fixture's own callback convention. It does not establish the ABI of the real Windows guard-dispatch slot. The new CFG case only measures how the loaders handle this hand-written image, and a specific refusal code on one Windows build is not a portable acceptance condition. Please add a separate, ordinary compiler/linker-produced CFG-enabled source fixture that Windows accepts, with an intended callback and a native trace. Keep normal CFG validation enabled and report the mapper outcome as a support boundary. The malformed-image observation can remain documented separately.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7108047860 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/914#issuecomment-7108047860). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T17:02:02Z. --- Thanks for the first source-built comparison. The three synthetic callback traces give us useful absent/present/alternate controls. Please describe the hand-written field as the fixture's own callback convention. It does not establish the ABI of the real Windows guard-dispatch slot. The new CFG case only measures how the loaders handle this hand-written image, and a specific refusal code on one Windows build is not a portable acceptance condition. Please add a separate, ordinary compiler/linker-produced CFG-enabled source fixture that Windows accepts, with an intended callback and a native trace. Keep normal CFG validation enabled and report the mapper outcome as a support boundary. The malformed-image observation can remain documented separately.
denn0x commented 2026-11-24 06:49:22 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-23T17:05:38Z.


@triggered02, on the maintainer's request for a separate compiler/linker-produced CFG fixture: the local version I mentioned is now on my fork as a reference branch, not a PR. It's denn0x:pe/load-config-callback, on main at d172f0a. Reuse any of it in #914. I won't open a competing PR.

What it has:

  • Files: tests/cpu/load_config_callback.{asm,cpp} and tests/cpu/load_config_callback_check.py, plus a CMake block that builds five variants from the same objects.
  • Caller: a C++ function compiled with /guard:cf calls a read-only, relocated callback table through __guard_dispatch_icall_fptr. The table's null entry is skipped.
  • Builds: each source is linked once without and once with /guard:cf. The CFG link uses the linker's own function table and flags (__guard_fids_table, __guard_fids_count, __guard_flags), and Windows accepts it.
  • Trace: written through cpu_exe_io!emit_trace. The exit code also reports whether the loader replaced the check and dispatch slots.
  • Controls: a different callback, and a target inside a function. With CFG on, Windows fast-fails that target and pe_map runs it. The test records the pe_map result as the current support boundary.
  • Robustness: every function is aligned to 16 bytes, so the CFG bitmap doesn't treat the inside-function target as valid. The check sets SEM_NOGPFAULTERRORBOX before the expected fast fail.
  • Status: dev and release pass here. Two things in it should change to match the maintainer's note:
    • It asserts the fast-fail status 0xC0000409 exactly, which isn't portable; checking "the process ended before writing output" would be safer.
    • It compares GuardFlags only for the table-present bit.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7108138507 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/914#issuecomment-7108138507). Originally posted by [denn0x](https://github.com/denn0x) on 2026-11-23T17:05:38Z. --- @triggered02, on the maintainer's request for a separate compiler/linker-produced CFG fixture: the local version I mentioned is now on my fork as a reference branch, not a PR. It's [`denn0x:pe/load-config-callback`](https://github.com/denn0x/Xbox2Windows/tree/pe/load-config-callback), on `main` at `d172f0a`. Reuse any of it in #914. I won't open a competing PR. What it has: - **Files:** `tests/cpu/load_config_callback.{asm,cpp}` and `tests/cpu/load_config_callback_check.py`, plus a CMake block that builds five variants from the same objects. - **Caller:** a C++ function compiled with `/guard:cf` calls a read-only, relocated callback table through `__guard_dispatch_icall_fptr`. The table's null entry is skipped. - **Builds:** each source is linked once without and once with `/guard:cf`. The CFG link uses the linker's own function table and flags (`__guard_fids_table`, `__guard_fids_count`, `__guard_flags`), and Windows accepts it. - **Trace:** written through `cpu_exe_io!emit_trace`. The exit code also reports whether the loader replaced the check and dispatch slots. - **Controls:** a different callback, and a target inside a function. With CFG on, Windows fast-fails that target and `pe_map` runs it. The test records the `pe_map` result as the current support boundary. - **Robustness:** every function is aligned to 16 bytes, so the CFG bitmap doesn't treat the inside-function target as valid. The check sets `SEM_NOGPFAULTERRORBOX` before the expected fast fail. - **Status:** dev and release pass here. Two things in it should change to match the maintainer's note: - It asserts the fast-fail status `0xC0000409` exactly, which isn't portable; checking "the process ended before writing output" would be safer. - It compares `GuardFlags` only for the table-present bit. _AI-assisted (Claude Code)._
triggered02 commented 2026-11-24 06:49:24 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-23T17:30:04Z.


Addressed the review:

  • Removed the malformed hand-built CFG image and its exact 0xc000003e assertion; its 20 s native timeout caused both Windows CI failures.
  • Kept present/absent/alternate and now label +0x78 as the fixture's own callback convention, not the real guard-dispatch ABI.
  • Added denn0x's linker-produced /guard:cf fixture as cpu_native_load_config_callback. Non-CFG record/other/invalid match; cfg_record Windows 0x30055 vs pe_map 0x55; cfg_invalid Windows ends before output (0xc0000409 locally) vs pe_map 0x77. The test asserts the pe_map boundary and no longer asserts an exact fast-fail code.
  • Dev and release: both tests pass (2.07 s / 2.03 s); docs and bidi checks pass. Credit to denn0x's pe/load-config-callback reference branch.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7108750477 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/914#issuecomment-7108750477). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-23T17:30:04Z. --- Addressed the review: - Removed the malformed hand-built CFG image and its exact `0xc000003e` assertion; its 20 s native timeout caused both Windows CI failures. - Kept present/absent/alternate and now label +0x78 as the fixture's own callback convention, not the real guard-dispatch ABI. - Added denn0x's linker-produced `/guard:cf` fixture as `cpu_native_load_config_callback`. Non-CFG `record`/`other`/`invalid` match; `cfg_record` Windows `0x30055` vs pe_map `0x55`; `cfg_invalid` Windows ends before output (`0xc0000409` locally) vs pe_map `0x77`. The test asserts the pe_map boundary and no longer asserts an exact fast-fail code. - Dev and release: both tests pass (2.07 s / 2.03 s); docs and bidi checks pass. Credit to denn0x's `pe/load-config-callback` reference branch. AI-assisted.
R0Y00 commented 2026-11-24 06:49:24 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T17:33:25Z.


The valid linker-produced CFG case now separates the Windows loader result from the mapper's current behavior. One assertion still makes unchecked dispatch a requirement: cfg_invalid must reach the interior target under pe_map. Please retain the current output as an observation and let this test also pass if the mapper explicitly rejects unsupported CFG before dispatch, or enforces CFG and rejects the invalid target with no entry result. Keep the native refusal, valid-config layout, and non-CFG variant assertions unchanged. This gives a later loader fix room to tighten the boundary without rewriting what the fixture is meant to establish.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7108832070 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/914#issuecomment-7108832070). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T17:33:25Z. --- The valid linker-produced CFG case now separates the Windows loader result from the mapper's current behavior. One assertion still makes unchecked dispatch a requirement: cfg_invalid must reach the interior target under pe_map. Please retain the current output as an observation and let this test also pass if the mapper explicitly rejects unsupported CFG before dispatch, or enforces CFG and rejects the invalid target with no entry result. Keep the native refusal, valid-config layout, and non-CFG variant assertions unchanged. This gives a later loader fix room to tighten the boundary without rewriting what the fixture is meant to establish.
triggered02 commented 2026-11-24 06:49:25 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-23T17:46:05Z.


Applied the cfg_invalid change in dc491dd.

  • The current unchecked result is recorded as an observation. The test also passes if pe_map rejects unsupported CFG before dispatch (mapping status or no start), or enforces CFG and ends the invalid target without an entry trace.
  • The native refusal, valid-config layout, and the non-CFG
    ecord/other/invalid assertions are unchanged.
  • Dev and release: both cpu_native_load_* tests pass. docs_links_check.py, idi_controls_check.py and git diff --check pass.

On the review points: the malformed hand-built cfg variant seen at f3c29f is gone. The remaining hand-built present/absent/alternate fixture and the docs call +0x78 the fixture's own callback convention, not the guard-dispatch ABI, and the hand-built GuardFlags=0x100 refusal is documented as a property of that malformed image rather than Windows validating the callback. The linker-produced CFG build is the separate cpu_native_load_config_callback test based on denn0x's reference branch.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7109150982 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/914#issuecomment-7109150982). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-23T17:46:05Z. --- Applied the cfg_invalid change in dc491dd. - The current unchecked result is recorded as an observation. The test also passes if pe_map rejects unsupported CFG before dispatch (mapping status or no start), or enforces CFG and ends the invalid target without an entry trace. - The native refusal, valid-config layout, and the non-CFG ecord/other/invalid assertions are unchanged. - Dev and release: both cpu_native_load_* tests pass. docs_links_check.py, idi_controls_check.py and git diff --check pass. On the review points: the malformed hand-built cfg variant seen at f3c29f is gone. The remaining hand-built present/absent/alternate fixture and the docs call +0x78 the fixture's own callback convention, not the guard-dispatch ABI, and the hand-built GuardFlags=0x100 refusal is documented as a property of that malformed image rather than Windows validating the callback. The linker-produced CFG build is the separate cpu_native_load_config_callback test based on denn0x's reference branch. AI-assisted.
R0Y00 commented 2026-11-24 06:49:26 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T18:02:35Z.


The revised fixture records the current unchecked outcome. I tightened the alternative to require status unsupported, a CFG diagnostic and no guest output. A generic mapping error or missing trace can no longer appear to establish a CFG result. Both source-built load-config tests passed in Windows x64 Release. This changes only the test and docs.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7109562924 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/914#issuecomment-7109562924). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T18:02:35Z. --- The revised fixture records the current unchecked outcome. I tightened the alternative to require status unsupported, a CFG diagnostic and no guest output. A generic mapping error or missing trace can no longer appear to establish a CFG result. Both source-built load-config tests passed in Windows x64 Release. This changes only the test and docs.
triggered02 commented 2026-11-24 06:49:26 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-23T18:06:02Z.


Synced 53561da and reran the fixture. Dev and release both pass. The extra acceptance is now the explicit unsupported/CFG diagnostic before dispatch; an unrelated load failure or missing output no longer counts. docs_links_check.py, idi_controls_check.py and git diff --check pass.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7109651032 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/914#issuecomment-7109651032). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-23T18:06:02Z. --- Synced 53561da and reran the fixture. Dev and release both pass. The extra acceptance is now the explicit unsupported/CFG diagnostic before dispatch; an unrelated load failure or missing output no longer counts. docs_links_check.py, idi_controls_check.py and git diff --check pass. AI-assisted.
Sign in to join this conversation.
No reviewers
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
R0Y00/Xbox2Windows!907
No description provided.