cpu: record the D3D12ConfigureVirtualMemoryX call shape under Windows and pe_map #884
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/891"
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 lukaslw-lab on 2026-11-23T16:13:42Z.
Change
Adds the source-built recording fixture R0Y00 asked for on #874. No
d3d12_xs.dllexport: what the call has to change on Windows is still open. Refs #874, #870.tests/cpu/configure_vm.asm: two EXEs reproduce the main executable's call. Each passes a 32-byte zero-filled block with one DWORD sample at+4(3 or 4), with canaries on both sides. Each then makes twoXMemVirtualAlloc(NULL, size, 0x20402000, …)reservations whatever the HRESULT was (16 GiB for 3, 24 GiB for 4).tests/cpu/configure_vm_recorder.cpp: stand-ins namedd3d12_xs.dllandxmem.dll, in their ownconfigure_vmbuild directory. They only log each call and return a chosen HRESULT. They implement nothing.docs/experiments.md: the observed call shape and the open questions: what the DWORD means, what the other 28 bytes are for, and what effect is required.This complements draft #888, which implements
XMemVirtualAllocinxmem_shim. This PR touches no shim. Once both land, the recorded reservation arguments match the shapes #888 accepts.Verification
Commit
6eb3341on Windows 10 22H2 (build 19045), Visual Studio 2026 18.12 (MSVC 19.52), Windows SDK 10.0.26100, CMake 4.3.1, Python 3.13.7.The same command with
--preset releasegave 7 passed, 0 skipped, 0 failed.tests/bidi_controls_check.pyandtests/docs_links_check.pypassed.cpu_native_configure_vmoutput (Release, sample 4; sample 3 is the same with400000000):Evidence and follow-up
pe_mapstops at that import before the entry point. Stand-in writes inside or after the block are caught. A failure HRESULT reaches the exit code unchanged.xmem.dllonce #888 lands.Checklist
AI-assisted: prepared with Claude Code; the commands and results above were run on the author's PC.
🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T16:27:53Z.
Review follow-up at
9adf97c. The original native EXE timed out locally after three successful comparisons even though it had a bounded body. The fixture now reuses the existing shared termination wrapper for the same image. Native runs start the test worker before process exit, and mapped runs return the original result to the host. Debug and Release each passed both input samples, failure propagation, both mutations and the missing-provider controls. The recorder still contains no production shim behavior. Fresh CI is running.