kernelx: delegate current-process VirtualAllocEx/FreeEx/ProtectEx #1554

Open
hajduzsolt wants to merge 1 commit from upstream-pr/1564 into main
hajduzsolt commented 2026-11-24 17:43:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by hajduzsolt on 2026-11-24T17:43:28Z.


Delegates VirtualAllocEx, VirtualFreeEx, and VirtualProtectEx to XCL's VirtualAlloc, VirtualFree, and VirtualProtect when targeting GetCurrentProcess(), fixing console/placeholder/graphics flag stripping and missing placeholder cleanup. Part of #1489.

What is in it

  • crates/xcl/src/hle/kernelx.rs: forward current-process VirtualAllocEx, VirtualFreeEx, and VirtualProtectEx calls to VirtualAlloc, VirtualFree, and VirtualProtect so placeholders (placeholders::alloc / placeholders::free), UMA/sparse VRAM windows, coherent heaps, and GRAPHICS_RESERVATIONS are handled identically to non-Ex calls.
  • crates/xcl/src/hle/kernelx.rs: add unit test virtual_alloc_ex_and_protect_ex_current_process_delegation verifying graphics allocation tracking and placeholder reservation/split through VirtualAllocEx and VirtualFreeEx.

Tested

  • Hardware & toolchain: AMD Radeon RX 9070 XT (driver 32.0.32029.2010), AMD Ryzen 7 9800X3D, Windows 11 10.0.26300.9974, rustc 1.98.1 (48a229cea 2026-09-01), debug (cargo test).
  • cargo test -p xcl --lib hle::kernelx::tests -- --test-threads=2: 30 passed, 0 failed, 1 ignored.
  • cargo test --workspace -- --test-threads=2: 777 passed, 0 failed, 41 ignored (xcl --lib: 728 passed, 0 failed, 21 ignored; integration/e2e suites: 49 passed, 0 failed, 20 ignored).
  • SKIPPED runtime tests: SKIPPED 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: A newer retail game
seconds: 60
exit: 0x0
frames shown: 1594 (PresentX 1594)
presents per 2 s (last 3): 49 48 14
device removals: 0
crashes: 0
peak commit: 20195 MB

PR:

xcl-smoke v1
commit: 48e36e8155f17f2ee935422b3bd9e2180581e575
gpu: AMD Radeon RX 9070 XT
title: A newer retail game
seconds: 60
exit: 0x0
frames shown: 1679 (PresentX 1679)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14839 MB

Not tested

  • Cross-process (proc_ != GetCurrentProcess()) calls and NVIDIA / Intel Arc adapters.

AI use

  • Antigravity (Gemini 4 Hydrogen, high): implemented current-process VirtualAllocEx/VirtualFreeEx/VirtualProtectEx delegation, wrote the unit test, ran the test suite, and prepared commit and PR description.
<!-- greyfinch-sync:ivall/xcl:issue:5477329721 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1564). Originally posted by [hajduzsolt](https://github.com/hajduzsolt) on 2026-11-24T17:43:28Z. --- Delegates VirtualAllocEx, VirtualFreeEx, and VirtualProtectEx to XCL's VirtualAlloc, VirtualFree, and VirtualProtect when targeting GetCurrentProcess(), fixing console/placeholder/graphics flag stripping and missing placeholder cleanup. Part of #1489. **What is in it** - crates/xcl/src/hle/kernelx.rs: forward current-process VirtualAllocEx, VirtualFreeEx, and VirtualProtectEx calls to VirtualAlloc, VirtualFree, and VirtualProtect so placeholders (placeholders::alloc / placeholders::free), UMA/sparse VRAM windows, coherent heaps, and GRAPHICS_RESERVATIONS are handled identically to non-Ex calls. - crates/xcl/src/hle/kernelx.rs: add unit test virtual_alloc_ex_and_protect_ex_current_process_delegation verifying graphics allocation tracking and placeholder reservation/split through VirtualAllocEx and VirtualFreeEx. **Tested** - Hardware & toolchain: AMD Radeon RX 9070 XT (driver 32.0.32029.2010), AMD Ryzen 7 9800X3D, Windows 11 10.0.26300.9974, rustc 1.98.1 (48a229cea 2026-09-01), debug (cargo test). - cargo test -p xcl --lib hle::kernelx::tests -- --test-threads=2: 30 passed, 0 failed, 1 ignored. - cargo test --workspace -- --test-threads=2: 777 passed, 0 failed, 41 ignored (xcl --lib: 728 passed, 0 failed, 21 ignored; integration/e2e suites: 49 passed, 0 failed, 20 ignored). - SKIPPED runtime tests: SKIPPED 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: A newer retail game seconds: 60 exit: 0x0 frames shown: 1594 (PresentX 1594) presents per 2 s (last 3): 49 48 14 device removals: 0 crashes: 0 peak commit: 20195 MB ``` PR: ``` xcl-smoke v1 commit: 48e36e8155f17f2ee935422b3bd9e2180581e575 gpu: AMD Radeon RX 9070 XT title: A newer retail game seconds: 60 exit: 0x0 frames shown: 1679 (PresentX 1679) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14839 MB ``` **Not tested** - Cross-process (proc_ != GetCurrentProcess()) calls and NVIDIA / Intel Arc adapters. **AI use** - Antigravity (Gemini 4 Hydrogen, high): implemented current-process VirtualAllocEx/VirtualFreeEx/VirtualProtectEx delegation, wrote the unit test, ran the test suite, and prepared commit and PR description.
DavidM1911 commented 2026-11-24 21:09:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T19:41:24Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored.

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7142451459 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1564#issuecomment-7142451459). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T19:41:24Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~22 ignored. Thanks!
Decodere commented 2026-11-27 11:18:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T11:18:24Z.


Independent desktop NVIDIA verification of PR #1564 at head 48e36e8155f17f2ee935422b3bd9e2180581e575 (1 commit; exact parent & merge-base: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12, Wave32-only Ada), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted tests & build (48e36e81)

Command Result
cargo test --release -p xcl --lib virtual_alloc_ex_and_protect_ex_current_process_delegation -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 831 filtered out × 3 (0.02s, 0.02s, 0.02s, 0 skipped)
cargo test --release -p xcl --lib hle::kernelx:: -- --nocapture (3 consecutive runs) 32 passed; 0 failed; 1 ignored; 799 filtered out × 3 (0.21s, 0.22s, 0.23s, 0 runtime skips; 1 pre-existing #[ignore] timing test scatter_timing)
cargo build --release -p xcl Clean build (1m 22s, exit 0, 0 new warnings in kernelx.rs)

Paired quiet 60 s retail smoke (title: 29640639)

(Note: scripts/smoke.ps1 at c160d86e predates 9683e7a6 and printed the local folder basename on title:; replaced below with the standard 9683e7a6 title hash 29640639, with all measured fields verbatim.)

Exact parent & merge-base (c160d86ef2efe3a07e4dfb473e4fa72eafb413c0):

xcl-smoke v1
commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1533 (PresentX 1533)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14721 MB

PR #1564 (48e36e8155f17f2ee935422b3bd9e2180581e575):

xcl-smoke v1
commit: 48e36e8155f17f2ee935422b3bd9e2180581e575
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1571 (PresentX 1571)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14715 MB

Limits of coverage

  • virtual_alloc_ex_and_protect_ex_current_process_delegation and the full hle::kernelx:: suite (32/32 active tests, 0 runtime skips) passed 3/3 on Windows 11, directly covering current-process VirtualAllocEx / VirtualFreeEx / VirtualProtectEx delegation.
  • The 60 s retail smoke confirms steady 60 Hz runtime non-regression (0 device removals, 0 crashes); single-run frame/commit delta vs. parent reflects normal startup variance.

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

<!-- greyfinch-sync:ivall/xcl:comment:7216921090 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1564#issuecomment-7216921090). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-27T11:18:24Z. --- Independent desktop NVIDIA verification of **PR #1564** at head `48e36e8155f17f2ee935422b3bd9e2180581e575` (`1` commit; exact parent & merge-base: `c160d86ef2efe3a07e4dfb473e4fa72eafb413c0`, pre-`#2555` ancestor of `main`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12, Wave32-only Ada), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6C / 12T), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` (Developer Mode off) - **Toolchain:** `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC `1.9.2609.5`, `--release` ### Targeted tests & build (`48e36e81`) | Command | Result | | --- | --- | | `cargo test --release -p xcl --lib virtual_alloc_ex_and_protect_ex_current_process_delegation -- --nocapture` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 831 filtered out` × 3 (`0.02s`, `0.02s`, `0.02s`, `0` skipped) | | `cargo test --release -p xcl --lib hle::kernelx:: -- --nocapture` (3 consecutive runs) | `32 passed; 0 failed; 1 ignored; 799 filtered out` × 3 (`0.21s`, `0.22s`, `0.23s`, `0` runtime skips; `1` pre-existing `#[ignore]` timing test `scatter_timing`) | | `cargo build --release -p xcl` | Clean build (`1m 22s`, exit `0`, `0` new warnings in `kernelx.rs`) | ### Paired quiet 60 s retail smoke (`title: 29640639`) *(Note: `scripts/smoke.ps1` at `c160d86e` predates `9683e7a6` and printed the local folder basename on `title:`; replaced below with the standard `9683e7a6` title hash `29640639`, with all measured fields verbatim.)* Exact parent & merge-base (`c160d86ef2efe3a07e4dfb473e4fa72eafb413c0`): ``` xcl-smoke v1 commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1533 (PresentX 1533) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14721 MB ``` PR #1564 (`48e36e8155f17f2ee935422b3bd9e2180581e575`): ``` xcl-smoke v1 commit: 48e36e8155f17f2ee935422b3bd9e2180581e575 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1571 (PresentX 1571) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14715 MB ``` ### Limits of coverage - `virtual_alloc_ex_and_protect_ex_current_process_delegation` and the full `hle::kernelx::` suite (`32/32` active tests, `0` runtime skips) passed `3/3` on Windows 11, directly covering current-process `VirtualAllocEx` / `VirtualFreeEx` / `VirtualProtectEx` delegation. - The 60 s retail smoke confirms steady 60 Hz runtime non-regression (`0` device removals, `0` crashes); single-run frame/commit delta vs. parent reflects normal startup variance. *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
futurepro62 commented 2026-11-27 17:59:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-27T17:59:10Z.


NVIDIA and AMD full-suite run, to go with the reports above by Decodere, since none of them covers AMD. Tested exact head 48e36e81 (on its base c160d86).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace --no-fail-fast -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 858 passed, 0 failed, 42 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: virtual_alloc_ex_and_protect_ex_current_process_delegation.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace --no-fail-fast -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 859 passed, 0 failed, 42 ignored. SKIPPED: heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • --skip leaves out tests that fail on main 6089122a too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651), the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu and mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7224995673 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1564#issuecomment-7224995673). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-27T17:59:10Z. --- NVIDIA and AMD full-suite run, to go with the reports above by Decodere, since none of them covers AMD. Tested exact head `48e36e81` (on its base `c160d86`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace --no-fail-fast -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests`: **858 passed, 0 failed, 42 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `virtual_alloc_ex_and_protect_ex_current_process_delegation`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace --no-fail-fast -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`: **859 passed, 0 failed, 42 ignored**. SKIPPED: `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `--skip` leaves out tests that fail on main `6089122a` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651), the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests, `const_and_null_mask_operands_agree_with_hlsl_on_the_gpu` and `mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu` ([follow-up on #1651](https://github.com/xcl-dev/xcl/issues/1651#issuecomment-7146069648)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`, and `gpu::dxil::fuzz_tests` seeds 70, 545, 1019 and 1507 fail `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card (drivers 616.64 and 621.40). On AMD: `fuzz_validate_and_gpu_1` fails on seed 540 (`res[833]` 0x7 vs CPU 0x6). The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
ClosetPie107 commented 2026-11-27 18:00:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-11-27T18:00:53Z.


Tested on AMD / Linux: 48e36e81 (RX 9070 16 GB, RDNA4, Mesa 26.3.1 RADV; Ryzen 5 9600X, 32 GB; CachyOS; Proton Experimental experimental-11.0-20261112 with vkd3d-proton master ec207194 plus a local patch dropping the lpVtbl checks of command allocators and lists; DXC 1.9.2609.5; Rust 1.96.0, x86_64-pc-windows-gnu debug build, tests run under Wine)

The head as it is (not merged onto current main), with its base c160d86e the same session as the baseline.

Tests (XCL_REQUIRE_GPU=wave64)

  • cargo test -p xcl --lib -- hle::kernelx:: --test-threads=1: 32 passed, 0 failed, 1 ignored (includes virtual_alloc_ex_and_protect_ex_current_process_delegation).
  • cargo test --workspace --no-fail-fast -- --test-threads=4 with --skip compositor_blends_ui_plane_over_scene_plane --skip failed_restore_stops_before_importing_an_unbacked_window --skip grooming_leaves_a_window_under_1_gib_only_its_hole (the first loses the RADV device here, the other two run out of memory under Wine): lib 796 passed, 14 failed, 22 ignored; base c160d86e lib (same flags): 795 passed, 14 failed, 22 ignored, the same 14. The other binaries fail the same 3 tests as on main here (e2e, pls_quota, predication_e2e).

Not tested

  • A retail title
  • Native Windows, NVIDIA / Intel

AI use

  • Claude Code (Claude Opus 5.5) wrote the test scripts, ran the builds and tests on my machine and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7225025976 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1564#issuecomment-7225025976). Originally posted by [ClosetPie107](https://github.com/ClosetPie107) on 2026-11-27T18:00:53Z. --- **Tested on AMD / Linux: `48e36e81`** (RX 9070 16 GB, RDNA4, Mesa 26.3.1 RADV; Ryzen 5 9600X, 32 GB; CachyOS; Proton Experimental `experimental-11.0-20261112` with vkd3d-proton master `ec207194` plus a local patch dropping the `lpVtbl` checks of command allocators and lists; DXC 1.9.2609.5; Rust 1.96.0, `x86_64-pc-windows-gnu` debug build, tests run under Wine) The head as it is (not merged onto current `main`), with its base `c160d86e` the same session as the baseline. **Tests** (`XCL_REQUIRE_GPU=wave64`) - `cargo test -p xcl --lib -- hle::kernelx:: --test-threads=1`: **32 passed, 0 failed**, 1 ignored (includes `virtual_alloc_ex_and_protect_ex_current_process_delegation`). - `cargo test --workspace --no-fail-fast -- --test-threads=4` with `--skip compositor_blends_ui_plane_over_scene_plane --skip failed_restore_stops_before_importing_an_unbacked_window --skip grooming_leaves_a_window_under_1_gib_only_its_hole` (the first loses the RADV device here, the other two run out of memory under Wine): lib 796 passed, 14 failed, 22 ignored; base `c160d86e` lib (same flags): 795 passed, 14 failed, 22 ignored, the same 14. The other binaries fail the same 3 tests as on `main` here (`e2e`, `pls_quota`, `predication_e2e`). **Not tested** - A retail title - Native Windows, NVIDIA / Intel **AI use** - Claude Code (Claude Opus 5.5) wrote the test scripts, ran the builds and tests on my machine and wrote this report.
Foniass commented 2026-12-01 06:08:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:08:14Z.


Triage (#1607) – head 48e36e8

Most of this is on main already: commit a0780942 makes VirtualAllocEx for the own process call VirtualAlloc (own_process, which also matches handles by process ID), and VirtualProtectEx for the own process does what VirtualProtect does. #1796 (D91, closed) made only the VirtualAllocEx part.
What is still not on main is the unconditional VirtualFreeEx -> VirtualFree for the own process. Main still sends non-UMA, non-sparse addresses to mem::VirtualFreeEx, which skips placeholders::free.
On rebase, keep only the VirtualFreeEx change, use own_process instead of == GetCurrentProcess(), and keep the placeholder part of the test.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7302522119 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1564#issuecomment-7302522119). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:08:14Z. --- **Triage (#1607)** – head 48e36e8 Most of this is on main already: commit a0780942 makes `VirtualAllocEx` for the own process call `VirtualAlloc` (`own_process`, which also matches handles by process ID), and `VirtualProtectEx` for the own process does what `VirtualProtect` does. #1796 (D91, closed) made only the `VirtualAllocEx` part. What is still not on main is the unconditional `VirtualFreeEx` -> `VirtualFree` for the own process. Main still sends non-UMA, non-sparse addresses to `mem::VirtualFreeEx`, which skips `placeholders::free`. On rebase, keep only the `VirtualFreeEx` change, use `own_process` instead of `== GetCurrentProcess()`, and keep the placeholder part of the test. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1564:upstream-pr/1564'
git switch 'upstream-pr/1564'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1564'
git switch 'upstream-pr/1564'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1564'
git switch 'upstream-pr/1564'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1564'
git switch 'main'
git merge --squash 'upstream-pr/1564'
git switch 'main'
git merge --ff-only 'upstream-pr/1564'
git switch 'main'
git merge 'upstream-pr/1564'
git push origin 'main'
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!1554
No description provided.