cpu: exercise a framed call to a bound leaf in the three-way EXE comparison #435

Merged
R0Y00 merged 15 commits from upstream-pr/441 into main 2026-11-22 03:32:00 +00:00
R0Y00 commented 2026-11-22 03:26:03 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T03:26:03Z.


Refs #317, #165. Integration after #420, #425 and #430. The EXE entry calls an exported, fixed-frame caller which saves RBX and directly calls a non-exported leaf without unwind data. The leaf range comes from the same EXE's linker map, bound to its image hash. The original and mapped processes run the same PE. The AOT executable links the actual generated entry, caller and leaf.

Local Windows x64, MSVC 19.51.36244, commit e88d4e7:

cmake --build out/verified --target cpu_exe_framed_lifted cpu_exe_original_lifted pe_map
ctest --test-dir out/verified --no-tests=error -R '^cpu_native_exe_(frame_)?chain$' -V

Both tests passed. For selectors 0 and 1, all three runners matched on the 16 import argument bytes, eight output bytes and process exit (0x57 and 0x60d). The control runs the unmodified EXE with the same selector and requires a difference in each field. The test retains missing-provider diagnostics.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6537900469 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/441). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-22T03:26:03Z. --- Refs #317, #165. Integration after #420, #425 and #430. The EXE entry calls an exported, fixed-frame caller which saves RBX and directly calls a non-exported leaf without unwind data. The leaf range comes from the same EXE's linker map, bound to its image hash. The original and mapped processes run the same PE. The AOT executable links the actual generated entry, caller and leaf. Local Windows x64, MSVC 19.51.36244, commit e88d4e7: ```powershell cmake --build out/verified --target cpu_exe_framed_lifted cpu_exe_original_lifted pe_map ctest --test-dir out/verified --no-tests=error -R '^cpu_native_exe_(frame_)?chain$' -V ``` Both tests passed. For selectors 0 and 1, all three runners matched on the 16 import argument bytes, eight output bytes and process exit (0x57 and 0x60d). The control runs the unmodified EXE with the same selector and requires a difference in each field. The test retains missing-provider diagnostics.
upstream-sync closed this pull request 2026-11-24 06:43:03 +00:00
grahamster2 commented 2026-11-24 06:48:22 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by grahamster2 on 2026-11-22T03:33:00Z.


Independent run on a second MSVC version: Windows 11 Pro build 26200, VS Build Tools 2026 18.3 (MSVC 19.50.35725, ML64), Windows SDK 10.0.26100, head e88d4e7.

  • cpu_native_exe_chain passed: selector 0 arguments 0303000001000000fdffffff00000000, output 1103000000000000, exit 0x60d; selector 1 arguments 30000000000000000600000000000000, output 3500000000000000, exit 0x57. Original, mapped and AOT runners matched.
  • cpu_native_exe_frame_chain passed with the same values, selectors swapped by the nested leaf (0 -> exit 0x57, 1 -> exit 0x60d). The bypass control differed in every field.
  • Full suite (-E '^(conditional_import_paths|static_exe_intake|bundled_export_forwarders)$'): 160 passed, 0 failed, 3 capability skips of 163 (bvh_wave64_hardware, bvh_wave64_warp, wave_shuffle_warp).
  • Differential call fuzz (frames, direct calls, tail jumps) against this head's cpu_switch_aot.py, seeds 100-119: 644 exports, 534 translated (314 with calls or tails), 110 refused as expected, 0 mismatches.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7073610084 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/441#issuecomment-7073610084). Originally posted by [grahamster2](https://github.com/grahamster2) on 2026-11-22T03:33:00Z. --- Independent run on a second MSVC version: Windows 11 Pro build 26200, VS Build Tools 2026 18.3 (MSVC 19.50.35725, ML64), Windows SDK 10.0.26100, head e88d4e7. - `cpu_native_exe_chain` passed: selector 0 arguments `0303000001000000fdffffff00000000`, output `1103000000000000`, exit 0x60d; selector 1 arguments `30000000000000000600000000000000`, output `3500000000000000`, exit 0x57. Original, mapped and AOT runners matched. - `cpu_native_exe_frame_chain` passed with the same values, selectors swapped by the nested leaf (0 -> exit 0x57, 1 -> exit 0x60d). The bypass control differed in every field. - Full suite (`-E '^(conditional_import_paths|static_exe_intake|bundled_export_forwarders)$'`): 160 passed, 0 failed, 3 capability skips of 163 (`bvh_wave64_hardware`, `bvh_wave64_warp`, `wave_shuffle_warp`). - Differential call fuzz (frames, direct calls, tail jumps) against this head's `cpu_switch_aot.py`, seeds 100-119: 644 exports, 534 translated (314 with calls or tails), 110 refused as expected, 0 mismatches.
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!435
No description provided.