cpu: cpu_native_startup and cpu_native_package_ordinal_startup fail on main since #1151 #2457
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#2457
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@Makto94 on GitHub · 2026-11-25 17:15 UTC · original
Two tests fail on current
mainand pass when280abb58(#1151, "pe: report the pe_map main EXE as the process image") is reverted.Environment: Windows 11 Pro build 26300.9974, Debug (
devpreset), MSVC 19.44.35230.0. Commit under test:e06aca8b. Serial run (-j1).Command:
Observed on
e06aca8b: 0/2 passed.cpu_native_package_ordinal_startup:package_ordinal_check.py:61assertion.pe_run_package.py ... cpu_package_ordinal_exe.exereturnedreturncode=13, with empty stdout and stderr.cpu_native_startup:native_startup_check.py:216raises "package runner failed",returncode=16974350(0x103020e). Stdout has theLOG,THREADSandTLSlines but no runner JSON.The two return codes are the fixtures' own results.
package_ordinal_exe.cppreturns 13 on success (exe_finish(result)), and the native run ofcpu_startup_exe.exelogsexit 0x103020e.Expected: 2/2 passed, as before
280abb58.Control: the same commit with
git revert --no-commit 280abb58(it applies without conflicts), same command: 2/2 passed.Reproduce:
CI on
main(push): the last green run is one33578e1.git log --oneline e33578e1..beabd641contains280abb58. Runs between those two commits were cancelled. The run onbeabd641(45636231471) concludedfailure: its "Build and test on Windows" and "Build and test on Windows at /O2" jobs fail on these same two tests. They fail on the same two tests in run 45642462400 (7092683a) and run 45653402072 (f39050c6).Likely cause (code reading, not traced): both fixtures end through
exe_finishintests/cpu/exe_exit.h, not throughfinish_exeintests/cpu/exe_io.cpp.exe_exit::started_as_process()compares the PEB'sImageBaseAddress(peb()+0x10) with__ImageBase. Since280abb58,pe_map_run_mainwrites the mapped EXE's base intoImageBaseAddress, so underpe_mapthis check is true andexe_finishcallsRtlExitUserProcess(code), which ends the runner process.280abb58changed the equivalent check infinish_exe(it now also requires the image to be in the loader's module list). It did not changeexe_exit.h, whose comment onstarted_as_process()still says that in a pe_map hostImageBaseAddressnames the host EXE.With only
started_as_process()changed to compare theDllBaseof the firstInLoadOrderModuleListentry with__ImageBase(the280abb58commit message states that the PEB loader list is not changed), both tests pass one06aca8bplus that change (local, Debug), andctest --preset dev --no-tests=error -j1 -R '^cpu_'passes 280/280. A PR with this change follows.Not measured:
^cpu_are affected by the regression locally.RtlExitUserProcessis the call that ends the runner process (no trace was taken).@tedin7 on GitHub · 2026-11-25 17:25 UTC · original
Working on a fix in tests/cpu/exe_exit.h; Draft PR shortly. AI-assisted; commands listed were executed locally.