tests: open vm_copy_queue_check heaps from mapped address #3651

Manually merged
github merged 1 commit from github-bot/gh-3649 into main 2026-12-02 02:14:05 +00:00 AGit
Owner

@⁠Ammmae0x on GitHub · 2026-11-30 21:14 UTC · original
Ammmae0x:tests/vm-copy-queue-address-heap → main · +273 −2 · 4 files · 1 commits · merged 2026-12-02 02:09 UTC

What changed

  • tests/vm_copy_queue_check.cpp (SectionPage::init): maps the 64 KiB section with FILE_MAP_ALL_ACCESS and opens the heap with ID3D12Device3::OpenExistingHeapFromAddress(canonical, IID_PPV_ARGS(&heap)) instead of OpenExistingHeapFromFileMapping(section, ...), mirroring #2393 / 7092683a in tests/vm_translation_check.cpp. No OpenExistingHeapFromFileMapping calls are left in the file.
  • Unchanged: PAGE_READWRITE section creation, the D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER staging buffer, the error returns, the destructor order (staging.Reset(); heap.Reset(); before UnmapViewOfFile(canonical); CloseHandle(section);), and the SectionWindow remap of page->section via MapViewOfFile3. All four CTest families (vm_copy_queue_*, vm_page_provenance_*, vm_raw_srv_*, vm_raw_uav_*) remain registered in CMakeLists.txt and dispatched by main().
  • New: docs/experiments/vm-copy-queue-address-heap.md, tests/vm_copy_queue_heap_check.py (Linux source audit plus mutation audit), tests/checks/python-linux/vm_copy_queue_heap.txt.

Tests

Linux (/tmp/pe-env):

  • tests/vm_copy_queue_heap_check.py: contract passes, mutation audit 8/8 killed
  • tests/form_coverage_check.py: passed
  • tests/docs_links_check.py: passed (192 Markdown files, 745 links)
  • tests/bidi_controls_check.py: passed (2762 files, no bidirectional controls)
  • tools/run_checks_parallel.py tests/vm_copy_queue_heap_check.py: all 1 checks passed
  • No mingw cross-compiler on this host, so no syntax check; Windows D3D12 execution awaits Windows verification.

Refs #2234

Windows Verification (f5983a07)

Commit: f5983a07f4a59d37a6ad9d40a2139b2d6befefd2 (merge-tree upstream/main HEAD -> be7c6a18, exit 0; git diff --check clean)
Adapters: in-box WARP + NVIDIA GeForce RTX 4050 Laptop GPU (vendor=10de device=28e1, XBOX2WINDOWS_ADAPTER=NVIDIA)
dev: cmake --build --preset dev --target vm_copy_queue_check && ctest --preset dev --no-tests=error -R "^vm_(copy_queue|page_provenance|raw_srv|raw_uav)_(warp|hardware)$" --output-on-failure -> 8/8 passed (1.97s; 0 failed)
release: cmake --build --preset release --target vm_copy_queue_check && ctest --preset release --no-tests=error -R "^vm_(copy_queue|page_provenance|raw_srv|raw_uav)_(warp|hardware)$" -E "cpu_native_archive_" --output-on-failure -> 8/8 passed (1.87s; 0 failed)
Checks: vm_copy_queue_heap_check.py (8/8 checks, 8/8 mutations killed), form_coverage_check.py, docs_links_check.py (193 files, 748 links), bidi_controls_check.py (2763 files) -> passed

AI-assisted.

**@⁠Ammmae0x** on GitHub · 2026-11-30 21:14 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3649) `Ammmae0x:tests/vm-copy-queue-address-heap` → `main` · +273 −2 · 4 files · 1 commits · merged 2026-12-02 02:09 UTC ## What changed - `tests/vm_copy_queue_check.cpp` (`SectionPage::init`): maps the 64 KiB section with `FILE_MAP_ALL_ACCESS` and opens the heap with `ID3D12Device3::OpenExistingHeapFromAddress(canonical, IID_PPV_ARGS(&heap))` instead of `OpenExistingHeapFromFileMapping(section, ...)`, mirroring #2393 / `7092683a` in `tests/vm_translation_check.cpp`. No `OpenExistingHeapFromFileMapping` calls are left in the file. - Unchanged: `PAGE_READWRITE` section creation, the `D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER` staging buffer, the error returns, the destructor order (`staging.Reset(); heap.Reset();` before `UnmapViewOfFile(canonical); CloseHandle(section);`), and the `SectionWindow` remap of `page->section` via `MapViewOfFile3`. All four CTest families (`vm_copy_queue_*`, `vm_page_provenance_*`, `vm_raw_srv_*`, `vm_raw_uav_*`) remain registered in `CMakeLists.txt` and dispatched by `main()`. - New: `docs/experiments/vm-copy-queue-address-heap.md`, `tests/vm_copy_queue_heap_check.py` (Linux source audit plus mutation audit), `tests/checks/python-linux/vm_copy_queue_heap.txt`. ## Tests Linux (`/tmp/pe-env`): - `tests/vm_copy_queue_heap_check.py`: contract passes, mutation audit 8/8 killed - `tests/form_coverage_check.py`: passed - `tests/docs_links_check.py`: passed (192 Markdown files, 745 links) - `tests/bidi_controls_check.py`: passed (2762 files, no bidirectional controls) - `tools/run_checks_parallel.py tests/vm_copy_queue_heap_check.py`: all 1 checks passed - No mingw cross-compiler on this host, so no syntax check; Windows D3D12 execution awaits Windows verification. Refs #2234 ### Windows Verification (`f5983a07`) ```text Commit: f5983a07f4a59d37a6ad9d40a2139b2d6befefd2 (merge-tree upstream/main HEAD -> be7c6a18, exit 0; git diff --check clean) Adapters: in-box WARP + NVIDIA GeForce RTX 4050 Laptop GPU (vendor=10de device=28e1, XBOX2WINDOWS_ADAPTER=NVIDIA) dev: cmake --build --preset dev --target vm_copy_queue_check && ctest --preset dev --no-tests=error -R "^vm_(copy_queue|page_provenance|raw_srv|raw_uav)_(warp|hardware)$" --output-on-failure -> 8/8 passed (1.97s; 0 failed) release: cmake --build --preset release --target vm_copy_queue_check && ctest --preset release --no-tests=error -R "^vm_(copy_queue|page_provenance|raw_srv|raw_uav)_(warp|hardware)$" -E "cpu_native_archive_" --output-on-failure -> 8/8 passed (1.87s; 0 failed) Checks: vm_copy_queue_heap_check.py (8/8 checks, 8/8 mutations killed), form_coverage_check.py, docs_links_check.py (193 files, 748 links), bidi_controls_check.py (2763 files) -> passed ``` AI-assisted. <!-- WIN-VERIFY: passed | sha=f5983a07f4a59d37a6ad9d40a2139b2d6befefd2 | targets=vm_copy_queue_check | ctest=^vm_(copy_queue|page_provenance|raw_srv|raw_uav)_(warp|hardware)$ | release=true -->
SectionPage::init opens each 64 KiB section heap with
ID3D12Device3::OpenExistingHeapFromAddress on the mapped CPU view
(FILE_MAP_ALL_ACCESS) instead of OpenExistingHeapFromFileMapping on the
section handle, mirroring #2393 / 7092683a in vm_translation_check.cpp.
The destructor already releases staging, then the heap, before unmapping
the view and closing the section; the cross-adapter staging flag and error
returns are unchanged. A new Linux source audit
(tests/vm_copy_queue_heap_check.py, 8/8 mutations killed) pins the
contract and the four CTest families built from this binary.

Refs #2234
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 21:16:10 +00:00
github manually merged commit 2423b699a1 into main 2026-12-02 02:14:05 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.