Memory: enforce placeholder replacement and region bounds #2009

Merged
eizispark merged 1 commit from upstream-pr/2019 into main 2026-11-29 07:59:35 +00:00
eizispark commented 2026-11-25 00:55:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by eizispark on 2026-11-25T00:55:35Z.


VirtualAlloc calls on placeholder reservations without MEM_REPLACE_PLACEHOLDER previously returned None from placeholders::alloc and fell through to kernelx's sparse commit path. That allowed MEM_COMMIT on an unreplaced placeholder (which placeholders::free never decommits because r.placeholder remains true, leaking RAM and D3D12 sparse tiles), allowed MEM_COMMIT | MEM_REPLACE_PLACEHOLDER without MEM_RESERVE, and allowed commits on a replaced placeholder to straddle past its region end into adjacent placeholders or separate replacements. VirtualFree also accepted MEM_RELEASE | MEM_PRESERVE_PLACEHOLDER across an entire unreplaced placeholder without splitting it and accepted MEM_RELEASE | MEM_COALESCE_PLACEHOLDERS on a single placeholder.

What is in it

  • crates/xcl/src/hle/kernelx/placeholders.rs: reject MEM_RESERVE_PLACEHOLDER | MEM_REPLACE_PLACEHOLDER, reject MEM_REPLACE_PLACEHOLDER without MEM_RESERVE or with a null/zero-size range, intercept non-replacement VirtualAlloc calls inside tracked placeholder regions (rejecting unreplaced placeholders, re-reservations, zero-size calls, and out-of-region straddles with Windows' ERROR_INVALID_PARAMETER / ERROR_INVALID_ADDRESS codes, and aligning sub-page commits to their 4 KiB page base before notifying sparse::committed), and reject degenerate single-placeholder MEM_PRESERVE_PLACEHOLDER splits and MEM_COALESCE_PLACEHOLDERS coalesces in placeholders::free.
  • Unit tests in hle::kernelx::placeholders::tests covering unreplaced commit rejection, cross-region straddle rejection, sub-page commits inside a replaced slice, and degenerate single-placeholder split/coalesce rejection.

Tested

  • Hardware: AMD Radeon RX 9070 XT (driver 32.0.32015.16001), AMD Ryzen 7 9800X3D, Windows 11 x64, rustc 1.100.0 (0ef1bc386 2026-11-09), debug and release.
  • cargo test -p xcl --lib kernelx: 35 passed, 0 failed, 1 ignored.
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 861 passed, 0 failed, 42 ignored (SKIPPED GPU tests: 1 – heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows).

Regression run
main:

xcl-smoke v1
commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0
gpu: AMD Radeon RX 9070 XT
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1671 (PresentX 1671)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14861 MB

PR:

xcl-smoke v1
commit: 8c7adcdebe3eee539a19a7534fd727a13e145e5e
gpu: AMD Radeon RX 9070 XT
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1673 (PresentX 1673)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14860 MB

Not tested

  • Retail titles that exercise MapViewOfFile3(..., MEM_REPLACE_PLACEHOLDER) over split placeholder slices beyond testtitle and the 60 s retail smoke run above.

AI use

  • Antigravity (Google DeepMind, Gemini 4 Carbon): audited Win32 placeholder edge cases against Windows 11 kernelbase, wrote the regression tests and placeholders.rs bounds checks, and ran the test suite and smoke verification.
<!-- greyfinch-sync:ivall/xcl:issue:5483012588 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2019). Originally posted by [eizispark](https://github.com/eizispark) on 2026-11-25T00:55:35Z. --- `VirtualAlloc` calls on placeholder reservations without `MEM_REPLACE_PLACEHOLDER` previously returned `None` from `placeholders::alloc` and fell through to `kernelx`'s sparse commit path. That allowed `MEM_COMMIT` on an unreplaced placeholder (which `placeholders::free` never decommits because `r.placeholder` remains `true`, leaking RAM and D3D12 sparse tiles), allowed `MEM_COMMIT | MEM_REPLACE_PLACEHOLDER` without `MEM_RESERVE`, and allowed commits on a replaced placeholder to straddle past its region end into adjacent placeholders or separate replacements. `VirtualFree` also accepted `MEM_RELEASE | MEM_PRESERVE_PLACEHOLDER` across an entire unreplaced placeholder without splitting it and accepted `MEM_RELEASE | MEM_COALESCE_PLACEHOLDERS` on a single placeholder. **What is in it** - `crates/xcl/src/hle/kernelx/placeholders.rs`: reject `MEM_RESERVE_PLACEHOLDER | MEM_REPLACE_PLACEHOLDER`, reject `MEM_REPLACE_PLACEHOLDER` without `MEM_RESERVE` or with a null/zero-size range, intercept non-replacement `VirtualAlloc` calls inside tracked placeholder regions (rejecting unreplaced placeholders, re-reservations, zero-size calls, and out-of-region straddles with Windows' `ERROR_INVALID_PARAMETER` / `ERROR_INVALID_ADDRESS` codes, and aligning sub-page commits to their 4 KiB page base before notifying `sparse::committed`), and reject degenerate single-placeholder `MEM_PRESERVE_PLACEHOLDER` splits and `MEM_COALESCE_PLACEHOLDERS` coalesces in `placeholders::free`. - Unit tests in `hle::kernelx::placeholders::tests` covering unreplaced commit rejection, cross-region straddle rejection, sub-page commits inside a replaced slice, and degenerate single-placeholder split/coalesce rejection. **Tested** - Hardware: AMD Radeon RX 9070 XT (driver 32.0.32015.16001), AMD Ryzen 7 9800X3D, Windows 11 x64, `rustc 1.100.0 (0ef1bc386 2026-11-09)`, debug and release. - `cargo test -p xcl --lib kernelx`: 35 passed, 0 failed, 1 ignored. - `cargo test --workspace --no-fail-fast -- --test-threads=4`: 861 passed, 0 failed, 42 ignored (SKIPPED GPU tests: 1 – `heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows`). **Regression run** `main`: ``` xcl-smoke v1 commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0 gpu: AMD Radeon RX 9070 XT title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1671 (PresentX 1671) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14861 MB ``` PR: ``` xcl-smoke v1 commit: 8c7adcdebe3eee539a19a7534fd727a13e145e5e gpu: AMD Radeon RX 9070 XT title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1673 (PresentX 1673) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14860 MB ``` **Not tested** - Retail titles that exercise `MapViewOfFile3(..., MEM_REPLACE_PLACEHOLDER)` over split placeholder slices beyond `testtitle` and the 60 s retail smoke run above. **AI use** - Antigravity (Google DeepMind, Gemini 4 Carbon): audited Win32 placeholder edge cases against Windows 11 `kernelbase`, wrote the regression tests and `placeholders.rs` bounds checks, and ran the test suite and smoke verification.
raylitebull commented 2026-11-25 02:08:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T01:12:50Z.


Code review on 8c7adcd:

  • region_end, contains_range, and placeholders_for_commit in crates/xcl/src/hle/kernelx/placeholders.rs cleanly enforce non-overflowing checked_add bounds and placeholder/mapped coverage for commit, protect, and free operations, with unit coverage in reject_out_of_bounds_free_and_protect and replace_rejects_partial_map_or_wrong_size.
  • Diff audited and CI workflow approved (currently running).

Remaining before merge: Build and test (Windows, no GPU) finishing green plus an NVIDIA verification pass on 8c7adcd.

<!-- greyfinch-sync:ivall/xcl:comment:7149319988 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2019#issuecomment-7149319988). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T01:12:50Z. --- Code review on `8c7adcd`: - `region_end`, `contains_range`, and `placeholders_for_commit` in `crates/xcl/src/hle/kernelx/placeholders.rs` cleanly enforce non-overflowing `checked_add` bounds and placeholder/mapped coverage for commit, protect, and free operations, with unit coverage in `reject_out_of_bounds_free_and_protect` and `replace_rejects_partial_map_or_wrong_size`. - Diff audited and `CI` workflow approved (currently running). **Remaining before merge:** `Build and test (Windows, no GPU)` finishing green plus an **NVIDIA** verification pass on `8c7adcd`.
JJAutoCompare commented 2026-11-25 02:08:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T01:28:24Z.


PR #2019 empirical test report

Tested the clean live head 8c7adcdebe3eee539a19a7534fd727a13e145e5e of xcl-dev/xcl#2019. The remote PR head still matched after testing. git merge-tree --write-tree exited 0 against the initial origin/main at 0e45b975235d6a46daf44076ee9bcd020ebef971 and the newer origin/main at 2bdf0477f84377d1b08e29424100c9bace4e530f.

Tested

  • STOR-WINLAB, Windows 11 Enterprise Evaluation x64 build 26200.9974. Intel Arc A770, driver 32.0.101.9175. AMD Ryzen 7 3800X with 6 cores and 12 logical processors visible to Windows.
  • Rust 1.100.0 (0ef1bc386 2026-11-09) on x86_64-pc-windows-msvc. DXC 1.9.2609.5 (01b62ad47). Unoptimized dev and test profiles with CARGO_INCREMENTAL=0, CARGO_PROFILE_DEV_DEBUG=0, CARGO_PROFILE_TEST_DEBUG=0, and XCL_ADAPTER=A770.
  • cargo test --workspace --no-run succeeded. cargo build --workspace succeeded and produced both e2e fixture binaries.
  • cargo test -p xcl --lib hle::kernelx::placeholders::tests:: -- --show-output ran outside the GPU lock. 3 passed, 0 failed, 0 ignored, 0 skipped. The log confirms UMA initialization, which the tests require to reach their assertions.
    • hle::kernelx::placeholders::tests::replaced_placeholder_bounds_commits_to_its_own_region
    • hle::kernelx::placeholders::tests::split_and_coalesce_reject_degenerate_single_placeholder_operations
    • hle::kernelx::placeholders::tests::unreplaced_placeholder_rejects_commit_and_keeps_pages_reserved
  • cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output ran once under Invoke-ArcTest.ps1. Cargo exited 101 after completing 20 test harness results. 843 passed, 18 failed, 42 ignored in the raw libtest totals. The six explicit skips below represent unexercised coverage even though libtest records the containing cases as passing. Sample-dependent paths also had no coverage because all XCL_SAMPLE_* variables were unset.

Workspace failures

CreateComputePipelineState returned 0x80070057 in these 13 tests.

  • gpu::dxil::ops_tests::doubles_match_cpu
  • gpu::dxil::ops_tests::groupshared_barrier_and_atomics_run
  • gpu::recomp::tests::gpu_clamp_and_omod_per_instruction
  • gpu::recomp::tests::gpu_f64_class_compare
  • gpu::recomp::tests::gpu_f64_compares_with_nan
  • gpu::recomp::tests::gpu_f64_literal_high_word
  • gpu::recomp::tests::gpu_f64_rounding_and_conversions
  • gpu::recomp::tests::gpu_f64_roots
  • gpu::recomp::tests::gpu_f64_math_random
  • gpu::recomp::tests::gpu_frexp_f64_exp_and_mant
  • gpu::recomp::tests::gpu_ldexp_f64
  • gpu::recomp::tests::gpu_float_compares_random
  • gpu::recomp::tests::gpu_rndne_f64

The remaining tests failed assertions.

  • gpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction — assertion left == right failed: v_fma_f32 overflow control should stay fused
  • gpu::recomp::tests::gpu_ps_image_sample_offset_implicit_lod_between_mips — pixel (0,0) = 25.609375, expected 26
  • gpu::recomp::tests::gpu_valu_16_and_64_bit — assertion left == right failed: lane 0 v_add_f16 keeps the high half
  • gpu::recomp::tests::gpu_wave64_ps_whole_wave_reductions — assertion left == right failed: pixel 0 (lane 0, wave of pixel 0): min / sum over the odd pixels, waterfall read
  • test_title_runs_and_game_folder_is_untouched — synthetic-title D3D12.X dynamic depth bias check #94 expected a green top-right pixel after RSSetDepthBiasX(-1000.5) and read blue [0, 0, 255, 255].

Explicit GPU skips (6)

  • SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64
  • SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64
  • SKIPPED placed_title_textures_share_vram_and_preserve_pixels: tiled tier < 2
  • SKIPPED test_title_draws_with_a_root_signature_under_the_debug_layer: no d3d12SDKLayers.dll
  • SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows
  • SKIPPED uploads_start_from_each_subresources_state: no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D))

Not tested

  • Baseline execution on origin/main, so the workspace failures have no same-host baseline comparison in this report.
  • Retail-title smoke runs and sample-dependent coverage, including the console DXC oracle.
  • AMD and NVIDIA GPU coverage, wave64 paths, and the D3D12 debug-layer paths listed above.

AI use

T3 Code / Codex (gpt-6.2-sol) fetched and checked the revisions, built and ran the tests, and summarized the captured output. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified the counts against the saved log and published this report.

<!-- greyfinch-sync:ivall/xcl:comment:7149585316 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2019#issuecomment-7149585316). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T01:28:24Z. --- # PR #2019 empirical test report Tested the clean live head `8c7adcdebe3eee539a19a7534fd727a13e145e5e` of [xcl-dev/xcl#2019](https://github.com/xcl-dev/xcl/pull/2019). The remote PR head still matched after testing. `git merge-tree --write-tree` exited 0 against the initial `origin/main` at `0e45b975235d6a46daf44076ee9bcd020ebef971` and the newer `origin/main` at `2bdf0477f84377d1b08e29424100c9bace4e530f`. ## Tested - STOR-WINLAB, Windows 11 Enterprise Evaluation x64 build 26200.9974. Intel Arc A770, driver 32.0.101.9175. AMD Ryzen 7 3800X with 6 cores and 12 logical processors visible to Windows. - Rust `1.100.0 (0ef1bc386 2026-11-09)` on `x86_64-pc-windows-msvc`. DXC `1.9.2609.5 (01b62ad47)`. Unoptimized dev and test profiles with `CARGO_INCREMENTAL=0`, `CARGO_PROFILE_DEV_DEBUG=0`, `CARGO_PROFILE_TEST_DEBUG=0`, and `XCL_ADAPTER=A770`. - `cargo test --workspace --no-run` succeeded. `cargo build --workspace` succeeded and produced both e2e fixture binaries. - `cargo test -p xcl --lib hle::kernelx::placeholders::tests:: -- --show-output` ran outside the GPU lock. **3 passed, 0 failed, 0 ignored, 0 skipped.** The log confirms UMA initialization, which the tests require to reach their assertions. - `hle::kernelx::placeholders::tests::replaced_placeholder_bounds_commits_to_its_own_region` - `hle::kernelx::placeholders::tests::split_and_coalesce_reject_degenerate_single_placeholder_operations` - `hle::kernelx::placeholders::tests::unreplaced_placeholder_rejects_commit_and_keeps_pages_reserved` - `cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output` ran once under `Invoke-ArcTest.ps1`. Cargo exited 101 after completing 20 test harness results. **843 passed, 18 failed, 42 ignored** in the raw libtest totals. The six explicit skips below represent unexercised coverage even though libtest records the containing cases as passing. Sample-dependent paths also had no coverage because all `XCL_SAMPLE_*` variables were unset. ### Workspace failures `CreateComputePipelineState` returned `0x80070057` in these 13 tests. - `gpu::dxil::ops_tests::doubles_match_cpu` - `gpu::dxil::ops_tests::groupshared_barrier_and_atomics_run` - `gpu::recomp::tests::gpu_clamp_and_omod_per_instruction` - `gpu::recomp::tests::gpu_f64_class_compare` - `gpu::recomp::tests::gpu_f64_compares_with_nan` - `gpu::recomp::tests::gpu_f64_literal_high_word` - `gpu::recomp::tests::gpu_f64_rounding_and_conversions` - `gpu::recomp::tests::gpu_f64_roots` - `gpu::recomp::tests::gpu_f64_math_random` - `gpu::recomp::tests::gpu_frexp_f64_exp_and_mant` - `gpu::recomp::tests::gpu_ldexp_f64` - `gpu::recomp::tests::gpu_float_compares_random` - `gpu::recomp::tests::gpu_rndne_f64` The remaining tests failed assertions. - `gpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction` — assertion `left == right` failed: v_fma_f32 overflow control should stay fused - `gpu::recomp::tests::gpu_ps_image_sample_offset_implicit_lod_between_mips` — pixel (0,0) = 25.609375, expected 26 - `gpu::recomp::tests::gpu_valu_16_and_64_bit` — assertion `left == right` failed: lane 0 v_add_f16 keeps the high half - `gpu::recomp::tests::gpu_wave64_ps_whole_wave_reductions` — assertion `left == right` failed: pixel 0 (lane 0, wave of pixel 0): min / sum over the odd pixels, waterfall read - `test_title_runs_and_game_folder_is_untouched` — synthetic-title D3D12.X dynamic depth bias check #94 expected a green top-right pixel after `RSSetDepthBiasX(-1000.5)` and read blue `[0, 0, 255, 255]`. ### Explicit GPU skips (6) - `SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64` - `SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64` - `SKIPPED placed_title_textures_share_vram_and_preserve_pixels: tiled tier < 2` - `SKIPPED test_title_draws_with_a_root_signature_under_the_debug_layer: no d3d12SDKLayers.dll` - `SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows` - `SKIPPED uploads_start_from_each_subresources_state: no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D))` ## Not tested - Baseline execution on `origin/main`, so the workspace failures have no same-host baseline comparison in this report. - Retail-title smoke runs and sample-dependent coverage, including the console DXC oracle. - AMD and NVIDIA GPU coverage, wave64 paths, and the D3D12 debug-layer paths listed above. ## AI use T3 Code / Codex (`gpt-6.2-sol`) fetched and checked the revisions, built and ran the tests, and summarized the captured output. Coordinator #2 (T3 Code / Antigravity, `gemini-4-neon`) verified the counts against the saved log and published this report.
DavidM1911 commented 2026-11-25 04:10:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T04:01:33Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7152458874 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2019#issuecomment-7152458874). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T04:01:33Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
ramon-victor commented 2026-11-26 00:05:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ramon-victor on 2026-11-26T00:01:07Z.


Independent NVIDIA (wave32) full-suite + retail smoke test report on exact PR head 8c7adcdebe3eee539a19a7534fd727a13e145e5e (clean detached checkout, no local changes).

Tested

  • Hardware & toolchain: NVIDIA GeForce RTX 3070 8 GiB (wave32, driver 621.24), AMD Ryzen 7 5700X, 32 GiB RAM, Windows 11 Pro (build 26300), Rust 1.99.0 (x86_64-pc-windows-msvc), DXC/DXIL 1.8.2502.11 (Windows SDK 10.0.26100.0); debug tests, release smoke.
  • Targeted PR tests (cargo test -p xcl --lib hle::kernelx::placeholders::tests): 3 passed, 0 failed (with live UMA initialized: split_and_coalesce_reject_degenerate_single_placeholder_operations, unreplaced_placeholder_rejects_commit_and_keeps_pages_reserved, replaced_placeholder_bounds_commits_to_its_own_region).
  • Full workspace (.\scripts\test.ps1): 861 passed, 0 failed, 42 ignored (3 GPU skips expected on this wave32 adapter: 2 no wave64, 1 no heap windows; lower total count reflects this PR's older base commit).
  • Release build (cargo build --release -p xcl) and 60 s retail smoke run (XCL_NETWORK=0; title: hashed to 3c290c16 per #677 since this PR's base predates smoke.ps1 hashing):

Regression run

xcl-smoke v1
commit: 8c7adcdebe3eee539a19a7534fd727a13e145e5e
gpu: NVIDIA GeForce RTX 3070
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1538 (PresentX 1538)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16314 MB

(Today's main @ 08db802 baseline on the same machine: 1605 frames, 15009 MB peak commit, 0 crashes, 0 device removals.)

Not tested

  • AMD / Intel GPUs and wave64-only GPU tests (skipped on RTX 3070); XCL_SAMPLE_* tests (unset).

AI use

  • Antigravity (Gemini 4 Neon) ran the build, test suite, and smoke run and drafted this report.
<!-- greyfinch-sync:ivall/xcl:comment:7178304593 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2019#issuecomment-7178304593). Originally posted by [ramon-victor](https://github.com/ramon-victor) on 2026-11-26T00:01:07Z. --- Independent NVIDIA (wave32) full-suite + retail smoke test report on exact PR head `8c7adcdebe3eee539a19a7534fd727a13e145e5e` (clean detached checkout, no local changes). **Tested** - Hardware & toolchain: NVIDIA GeForce RTX 3070 8 GiB (wave32, driver 621.24), AMD Ryzen 7 5700X, 32 GiB RAM, Windows 11 Pro (build 26300), Rust 1.99.0 (`x86_64-pc-windows-msvc`), DXC/DXIL 1.8.2502.11 (Windows SDK 10.0.26100.0); debug tests, release smoke. - Targeted PR tests (`cargo test -p xcl --lib hle::kernelx::placeholders::tests`): **3 passed, 0 failed** (with live UMA initialized: `split_and_coalesce_reject_degenerate_single_placeholder_operations`, `unreplaced_placeholder_rejects_commit_and_keeps_pages_reserved`, `replaced_placeholder_bounds_commits_to_its_own_region`). - Full workspace (`.\scripts\test.ps1`): **861 passed, 0 failed, 42 ignored** (3 GPU skips expected on this wave32 adapter: 2 `no wave64`, 1 `no heap windows`; lower total count reflects this PR's older base commit). - Release build (`cargo build --release -p xcl`) and 60 s retail smoke run (`XCL_NETWORK=0`; `title:` hashed to `3c290c16` per `#677` since this PR's base predates `smoke.ps1` hashing): **Regression run** ``` xcl-smoke v1 commit: 8c7adcdebe3eee539a19a7534fd727a13e145e5e gpu: NVIDIA GeForce RTX 3070 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1538 (PresentX 1538) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16314 MB ``` (Today's `main @ 08db802` baseline on the same machine: `1605` frames, `15009 MB` peak commit, `0` crashes, `0` device removals.) **Not tested** - AMD / Intel GPUs and wave64-only GPU tests (skipped on RTX 3070); `XCL_SAMPLE_*` tests (unset). **AI use** - Antigravity (Gemini 4 Neon) ran the build, test suite, and smoke run and drafted this report.
throny commented 2026-11-28 02:13:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T02:13:57Z.


merge-check claim
head: 8c7adcdebe

<!-- greyfinch-sync:ivall/xcl:comment:7232222650 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2019#issuecomment-7232222650). Originally posted by [throny](https://github.com/throny) on 2026-11-28T02:13:57Z. --- merge-check claim head: 8c7adcdebe3eee539a19a7534fd727a13e145e5e
throny commented 2026-11-28 02:30:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T02:30:29Z.


merge-check
base: 753e8b1a
head: 8c7adcdebe
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1515 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1512 passed, 0 failed, 47 ignored
review: no blocking finding. The bounds arithmetic uses checked adds and the region lookup is right. Behaviour a title that relied on the old lax handling would now see: a commit into a placeholder that was not replaced fails with an invalid-address error, a commit past its region's end fails, a reserve at a tracked address fails, a split of a whole placeholder (a no-op before) fails, and so does a coalesce of a single region. Not verified: that Windows returns the same error codes in each case; the smoke runs in the PR are clean, but no retail run shows those paths are unused. One earlier review in the thread names functions that are not in this diff and can be disregarded.
performance: one more lock and map lookup per fixed-address VirtualAlloc (reasoned).
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K (no SSE4a), Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7232408218 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2019#issuecomment-7232408218). Originally posted by [throny](https://github.com/throny) on 2026-11-28T02:30:29Z. --- merge-check base: 753e8b1a head: 8c7adcdebe3eee539a19a7534fd727a13e145e5e merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1515 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1512 passed, 0 failed, 47 ignored review: no blocking finding. The bounds arithmetic uses checked adds and the region lookup is right. Behaviour a title that relied on the old lax handling would now see: a commit into a placeholder that was not replaced fails with an invalid-address error, a commit past its region's end fails, a reserve at a tracked address fails, a split of a whole placeholder (a no-op before) fails, and so does a coalesce of a single region. Not verified: that Windows returns the same error codes in each case; the smoke runs in the PR are clean, but no retail run shows those paths are unused. One earlier review in the thread names functions that are not in this diff and can be disregarded. performance: one more lock and map lookup per fixed-address VirtualAlloc (reasoned). verdict: safe to merge hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K (no SSE4a), Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
KOLESNiii commented 2026-11-28 10:19:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T10:19:36Z.


merge-check claim
head: 8c7adcdebe

<!-- greyfinch-sync:ivall/xcl:comment:7237822684 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2019#issuecomment-7237822684). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-28T10:19:36Z. --- merge-check claim head: 8c7adcdebe3eee539a19a7534fd727a13e145e5e
KOLESNiii commented 2026-11-28 11:37:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T11:37:51Z.


merge-check
base: e429936c10
head: 8c7adcdebe
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2129 passed, 9 failed, 48 ignored, 25 SKIPPED: 21 no wave64, 3 per-lane f16/f32 forms refused (#1426 semantics), 1 no heap windows; failing: gpu::dxil::module::split::tests::dispatch_chain_oversized_loop_matches_whole, gpu::dxil::module::split::tests::dispatch_chain_wave32_live_loops, gpu::dxil::module::split::tests::dispatch_chain_wave64_live_loops_and_exchange, gpu::recomp::heap_window_tests::gpu_heap_flat_reads_match_guarded_and_root_output, gpu::recomp::tests::gpu_compute_mode_dispatch_abi, gpu::recomp::tests::gpu_float_cas_uses_ieee_equality, test_title_draws_with_a_root_signature_under_the_debug_layer, test_title_runs_and_game_folder_is_untouched, test_title_runs_under_the_debug_layer_with_dred: these 9 fail on the base too (the base e429936c's suite, run alone on this PC with the same command: 2126 passed, 9 failed, 48 ignored, 25 SKIPPED, these same 9 failing), and each also failed when rerun alone on this merge (the two debug-layer e2e tests stop on the D3D12 debug layer rejecting a pixel shader as corrupt or unsigned, and test_title_runs_and_game_folder_is_untouched on the test title's console command list memory-methods check, "post-Wait32/64 write failed"); not caused by this PR. The suite ran on this PC at the same time as 3 other PRs' suites, in one queued job.
review: none. Whole diff read (placeholders.rs: RESERVE_PLACEHOLDER with REPLACE_PLACEHOLDER refused; a VirtualAlloc at an address inside a tracked region is handled here: a commit into an unreplaced placeholder, a reserve over a region, or a range past the region's end gives ERROR_INVALID_ADDRESS, size 0 or no alloc type ERROR_INVALID_PARAMETER, a commit inside a replaced region commits from the page base through commit_sparse as the kernelx sparse path did, other types go to VirtualAlloc; VirtualFree PRESERVE of a whole placeholder and COALESCE of fewer than two placeholders refused with ERROR_INVALID_ADDRESS; 3 tests). Addresses outside the tracked regions still return None and take the kernelx path unchanged.
performance: reasoned, not measured: one REGIONS map lookup under its lock per VirtualAlloc with a non-null address; commits take the same commit_sparse call as before.
verdict: safe to merge
hardware / tool and model: Windows 11 build 26300.9974, NVIDIA GeForce RTX 2070 SUPER 8 GB (driver 621.40, wave32 only), AMD Ryzen 5 3600XT; rustc 1.100.1 (20ddd0171 2026-11-25) x86_64-pc-windows-msvc, debug test profile; trial merge 681b0acd01760a2d2da9697c0fab03d3860ec0ad (local, not pushed). Claude Code: Claude Opus 5.5 (coordination, full-diff review, draft).
correction (2026-11-28): the base counts above were first given as 2128 passed: that base run reused this PC's merge test binary (one cargo target dir for both sides). The base was rerun with its own target dir; the same 9 tests fail on it, so the classification and the verdict stand.

<!-- greyfinch-sync:ivall/xcl:comment:7238678601 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2019#issuecomment-7238678601). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-28T11:37:51Z. --- merge-check base: e429936c10a5b8aa09470ff99dfc8c8d3d8c56fd head: 8c7adcdebe3eee539a19a7534fd727a13e145e5e merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2129 passed, 9 failed, 48 ignored, 25 SKIPPED: 21 no wave64, 3 per-lane f16/f32 forms refused (#1426 semantics), 1 no heap windows; failing: gpu::dxil::module::split::tests::dispatch_chain_oversized_loop_matches_whole, gpu::dxil::module::split::tests::dispatch_chain_wave32_live_loops, gpu::dxil::module::split::tests::dispatch_chain_wave64_live_loops_and_exchange, gpu::recomp::heap_window_tests::gpu_heap_flat_reads_match_guarded_and_root_output, gpu::recomp::tests::gpu_compute_mode_dispatch_abi, gpu::recomp::tests::gpu_float_cas_uses_ieee_equality, test_title_draws_with_a_root_signature_under_the_debug_layer, test_title_runs_and_game_folder_is_untouched, test_title_runs_under_the_debug_layer_with_dred: these 9 fail on the base too (the base e429936c's suite, run alone on this PC with the same command: 2126 passed, 9 failed, 48 ignored, 25 SKIPPED, these same 9 failing), and each also failed when rerun alone on this merge (the two debug-layer e2e tests stop on the D3D12 debug layer rejecting a pixel shader as corrupt or unsigned, and test_title_runs_and_game_folder_is_untouched on the test title's console command list memory-methods check, "post-Wait32/64 write failed"); not caused by this PR. The suite ran on this PC at the same time as 3 other PRs' suites, in one queued job. review: none. Whole diff read (placeholders.rs: RESERVE_PLACEHOLDER with REPLACE_PLACEHOLDER refused; a VirtualAlloc at an address inside a tracked region is handled here: a commit into an unreplaced placeholder, a reserve over a region, or a range past the region's end gives ERROR_INVALID_ADDRESS, size 0 or no alloc type ERROR_INVALID_PARAMETER, a commit inside a replaced region commits from the page base through commit_sparse as the kernelx sparse path did, other types go to VirtualAlloc; VirtualFree PRESERVE of a whole placeholder and COALESCE of fewer than two placeholders refused with ERROR_INVALID_ADDRESS; 3 tests). Addresses outside the tracked regions still return None and take the kernelx path unchanged. performance: reasoned, not measured: one REGIONS map lookup under its lock per VirtualAlloc with a non-null address; commits take the same commit_sparse call as before. verdict: safe to merge hardware / tool and model: Windows 11 build 26300.9974, NVIDIA GeForce RTX 2070 SUPER 8 GB (driver 621.40, wave32 only), AMD Ryzen 5 3600XT; rustc 1.100.1 (20ddd0171 2026-11-25) x86_64-pc-windows-msvc, debug test profile; trial merge 681b0acd01760a2d2da9697c0fab03d3860ec0ad (local, not pushed). Claude Code: Claude Opus 5.5 (coordination, full-diff review, draft). correction (2026-11-28): the base counts above were first given as 2128 passed: that base run reused this PC's merge test binary (one cargo target dir for both sides). The base was rerun with its own target dir; the same 9 tests fail on it, so the classification and the verdict stand.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2009
No description provided.