tests: keep exe_exit fixtures from ending the pe_map host (fixes #2457) #2465
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!2465
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2465/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@tedin7 on GitHub · 2026-11-25 17:25 UTC · original
tedin7:fix-2457-exe-exit→main· +10 −2 · 1 files · 1 commits · merged 2026-11-25 17:32 UTCPart of #1758
Fixes #2457
What this unblocks: main Windows checks go green again, so the merge queue moves.
Cause:
280abb58d) makespe_map_run_mainwrite the mapped EXE base into PEBImageBaseAddress, on purpose.tests/cpu/exe_exit.hstarted_as_process()trusted only that field, so underpe_run_packagea fixture saw itself as the real process.RtlExitUserProcess(13)and ended the Python runner before any JSON was printed.Change:
started_as_process()keeps the PEBImageBaseAddresscheck and also requires that the first entry ofPEB->Ldr->InLoadOrderModuleListhasDllBase == &__ImageBase. Natively the process EXE is first in that list. Under pe_map the loader list is unchanged, so the first entry is the host. No new imports.tools/pe_map.cppis untouched. Header comment updated.Verification:
git diff --check: cleanx86_64-w64-mingw32-g++ -fsyntax-only -std=c++20 -fpermissive -Itests/cpu tests/cpu/package_ordinal_exe.cpp: rc 0tests/cpu/startup_exe.cpp: rc 0 (only unrelated attribute warnings)git grep -n "started_as_process\|exe_finish": only package_ordinal_exe.cpp and startup_exe.cpp call itcpu_native_package_ordinal_startup|cpu_native_startup|cpu_package_main_image|cpu_native_process_image|cpu_native_exe_tls_slot0AI-assisted; commands listed were executed locally.
@tedin7 on GitHub · 2026-11-25 17:30 UTC · original
Independent verification of
ccad2835eWin2025 WARP (5-slot pool, slot 1
C:\x2w), headccad2835e8702db697da23f40553a1fa16883acb, fresh build ofpe_mapand the exe fixtures (tls_slot0, host, pause, enroll, process_image, startup/package_ordinal exes):x2w_pipe.py win2025 2465 --force --targets pe_map,cpu_exe_tls_slot0,cpu_exe_tls_slot0_host,cpu_exe_tls_slot0_pause,cpu_exe_tls_slot0_enroll,cpu_exe_process_image,cpu_package_ordinal_exe,cpu_package_ordinal_exe_return,cpu_startup_exe,cpu_startup_exe_create,cpu_startup_exe_linger,cpu_startup_exe_linger_return,cpu_startup_exe_timeout --regex 'cpu_native_package_ordinal_startup|cpu_native_startup|cpu_package_main_image|cpu_native_process_image|cpu_native_exe_tls_slot0'An earlier run of the same regex had 4 failures (tls_slot0, tls_slot0_enroll, process_image, package_main_image). The cause was a target list that left out
pe_mapand the fixtures, so old binaries ran. With them built, all pass.AI-assisted; commands listed were executed locally.
@chatgpt-codex-connector[bot] on GitHub · 2026-11-25 17:30 UTC · original · edited 2026-11-25 17:32 UTC
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
ccad283ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.