cpu: compare the same EXE under Windows, pe_map and AOT #249

Manually merged
github merged 2 commits from gh-pr/249/head into gh-pr/249/base 2026-11-26 21:37:28 +00:00
Owner

@⁠R0Y00 on GitHub · 2026-11-21 19:16 UTC · original
R0Y00:codex/exe-mapped-comparison → main · +75 −0 · 3 files · 2 commits · merged 2026-11-21 19:23 UTC

Refs #165, #228. Uses pe_map_run from merged #238 (23d954d5).

Runs the same source-built cpu_exe_original.exe as a Windows process and through pe_map, then compares both with its AOT build. The mapped child inherits the same pipes and propagates the guest return value. Removing host bindings locates the first missing import before entry. All generated artifacts stay under out/.

Local Windows x64 verification used pe_map.cpp at #238 e238a653 built by MSVC and the #228 targets built with cmake --build --preset dev --target cpu_exe_original_lifted. From the repo root:

$b=(Resolve-Path out/build/dev).Path
& out/pe-env/Scripts/python.exe -B tests/cpu/mapped_exe_chain_check.py (Resolve-Path out/pe_map_238.dll).Path "$b/cpu_exe_original.exe" "$b/cpu_exe_original_lifted.exe" "$b/cpu_exe_io.dll" "$b/cpu_import_provider.dll"

With no bindings mapping stopped at cpu_exe_io.dll!emit_trace. Providing I/O alone stopped at cpu_import_provider.dll!mix_args. Binding both DLLs produced identical observations on all three paths. Inputs 00/01 produced output bytes 1103000000000000 / 3500000000000000 and exit codes 0x60d / 0x57 respectively. The two integer arguments received by the provider matched byte for byte in both runs.

Integrated CTest: ctest --preset dev --no-tests=error -R '^cpu_native_exe_chain$' -V.

AI-assisted.

Final Windows verification at 747b58b86d on the integrated tree: cpu_native_exe_chain, cpu_native_exe_start and cpu_aot_exe_entry passed 3/3 with ctest --preset dev --no-tests=error -R '^(cpu_native_exe_chain|cpu_native_exe_start|cpu_aot_exe_entry)$' -V.

**@⁠R0Y00** on GitHub · 2026-11-21 19:16 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/249) `R0Y00:codex/exe-mapped-comparison` → `main` · +75 −0 · 3 files · 2 commits · merged 2026-11-21 19:23 UTC Refs #165, #228. Uses pe_map_run from merged #238 (23d954d5). Runs the same source-built cpu_exe_original.exe as a Windows process and through pe_map, then compares both with its AOT build. The mapped child inherits the same pipes and propagates the guest return value. Removing host bindings locates the first missing import before entry. All generated artifacts stay under out/. Local Windows x64 verification used pe_map.cpp at #238 e238a653 built by MSVC and the #228 targets built with cmake --build --preset dev --target cpu_exe_original_lifted. From the repo root: ```powershell $b=(Resolve-Path out/build/dev).Path & out/pe-env/Scripts/python.exe -B tests/cpu/mapped_exe_chain_check.py (Resolve-Path out/pe_map_238.dll).Path "$b/cpu_exe_original.exe" "$b/cpu_exe_original_lifted.exe" "$b/cpu_exe_io.dll" "$b/cpu_import_provider.dll" ``` With no bindings mapping stopped at cpu_exe_io.dll!emit_trace. Providing I/O alone stopped at cpu_import_provider.dll!mix_args. Binding both DLLs produced identical observations on all three paths. Inputs 00/01 produced output bytes 1103000000000000 / 3500000000000000 and exit codes 0x60d / 0x57 respectively. The two integer arguments received by the provider matched byte for byte in both runs. Integrated CTest: `ctest --preset dev --no-tests=error -R '^cpu_native_exe_chain$' -V`. AI-assisted. Final Windows verification at 747b58b86df6eaa2f5fcaf1397ad03339dc487f0 on the integrated tree: cpu_native_exe_chain, cpu_native_exe_start and cpu_aot_exe_entry passed 3/3 with ctest --preset dev --no-tests=error -R '^(cpu_native_exe_chain|cpu_native_exe_start|cpu_aot_exe_entry)$' -V.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:37:27 +00:00
github manually merged commit 747b58b86d into gh-pr/249/base 2026-11-26 21:37:28 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.