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

Merged
R0Y00 merged 2 commits from upstream-pr/249 into main 2026-11-21 19:23:17 +00:00
R0Y00 commented 2026-11-21 19:16:25 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T19:16:25Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6533283584 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/249). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-21T19:16:25Z. --- 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.
upstream-sync closed this pull request 2026-11-24 06:42:01 +00:00
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!246
No description provided.