tests: start the XMem default pair EXE natively and under pe_map #906
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/913"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by rasptum on 2026-11-23T16:57:51Z.
Refs #875, #879 and #870.
This is a test and evidence follow-up to #879, as R0Y00 asked on #875. It changes only tests, CMake and docs;
src/andtools/pe_map.cppare untouched.cpu_native_xmem_default_pairbuildstests/cpu/xmem_default_pair.asminto four x64 EXEs. Each importsXMemAllocDefault/XMemFreeDefaultby name from the desktopxmem.dlland starts throughexe_startup.asm/finish_exe. Each EXE is launched normally, then mapped and started withpe_map_run. The body returns0x875, or0xF00plus the first failing step.Named checks (each prints its own line)
pe_import_namespefilefindsxmem.dllimported for exactlyXMemAllocDefaultandXMemFreeDefault, by name, in all four EXEs.mapped_resolver_namespe_mapresolver callback records its requests. It must be asked for both names plus the five other imports, and nothing else. The existingMapperhook is reused, with nope_map.cppchange.heap_block(steps 1–5)graphics_block(6–9)rejected_inputs(10–14)induced_failure(15–18)VirtualAlloc. A control allocation with the same word then succeeds and is freed.graphics_release_virtualquery(19–20)VirtualQueryreports the graphics VA asMEM_FREEafterXMemFreeDefault.heap_release_ownership(21)VirtualQuery. The newtests/cpu/heap_probe.cpplocks andHeapWalks every process heap. Before free, a busy entry must contain the block; after free, none may.Negative controls
pe_maporiginal0x8750x875skip_gpu_free0xf140xf14graphics_release_virtualqueryskip_heap_free0xf150xf15heap_release_ownershipuninduced(4096 bytes at step 15)0xf0f0xf0finduced_failureA provider missing
XMemAllocDefaultorXMemFreeDefaultstops the mapping before the entry point withunresolved import xmem.dll!<name>.Results
Windows 10 Pro 10.0.19045.6466, MSVC 19.44.35207.1 x64, CMake/Ninja, commit
24f4297onorigin/main02db28b. CPU-only tests, so no adapter or debug layer is involved.cpu_native_xmem_default_pairpassed 5/5 repeats.release): 20/20 passed, with 5/5 repeats.tests/form_coverage_check.py,tests/docs_links_check.pyandtests/bidi_controls_check.pypass.cpu_native_xmem_physical_pairand #887'scpu_native_xmem_physical. The docs block sits at the end of the "Desktop xmem.dll" section.ABI evidence vs desktop behavior
era.hat 912bb11 declaresPVOID WINAPI XMemAllocDefault(SIZE_T, ULONGLONG)andvoid WINAPI XMemFreeDefault(PVOID, ULONGLONG). That is an independent reimplementation's declaration, not console evidence.No game files, dumps or binaries. All attribute words and sizes are synthetic.
🤖 Generated with Claude Code