eh: harden is_writable for PAGE_GUARD, regions, and lazy pages (#626) #518

Open
Grimkaaah wants to merge 1 commit from upstream-pr/523 into main
Grimkaaah commented 2026-11-24 01:16:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Grimkaaah on 2026-11-24T01:16:49Z.


Fixes #626 (item 3 of #278: is_writable guards). Items 1–2 are already on main; item 4 is #321. Complements #501 (sparse-window fast path) — this PR fixes the VirtualQuery fallback that #501 still uses.

Emulated CLZERO / ClzeroLoop asked whether the destination was writable with a single VirtualQuery. That was wrong in four ways:

  1. PAGE_GUARD. PAGE_READWRITE | PAGE_GUARD (0x104) passed & (PAGE_READWRITE | PAGE_EXECUTE_READWRITE) != 0, so the VEH would write through a guard page instead of letting the real fault happen.
  2. One region only. A ClzeroLoop can cover adjacent committed runs with different protect; one query only sees the first.
  3. Unchecked va + bytes. A wrapping end was undefined.
  4. Lazy physical pages. A page still in MEM_RESERVE (lazy map) made is_writable false → 0xC000001D, instead of committing via lazy::ensure and zeroing.

What is in it

  • eh::is_writable now matches the shape of dstorage::writable: checked_add → lazy::ensure → UMA coherent-window fast path → walk every VirtualQuery region covering [va, end), requiring a writable protect (READWRITE / WRITECOPY / EXECUTE_*) and no PAGE_GUARD.
  • Unit tests (VirtualAlloc only): guard refused then accepted after VirtualProtect; PAGE_NOACCESS and wrapping end; span across two differently-protected committed pages; reserved hole fails; lazy page commits through ensure; CLZERO on a guard page returns 0 without clearing the guard.

Tested

  • Machine: Windows 11, AMD Radeon RX 7900 XTX, MSVC, rustc from rust-toolchain.toml.
  • cargo test -p xcl --lib eh::tests -- --nocapture: 8 passed, 0 failed.
  • cargo test -p xcl --lib -- --test-threads=4: 648 passed, 0 failed, 21 ignored; 0 GPU SKIPPED.
  • Head commit of this PR: ed2f33c.

Regression run

Same title and wall time on main and on this PR's head (clean tree):

xcl-smoke v1
commit: 3db536ebe231418d76e8d6e52ccee0b47330a522
gpu: AMD Radeon RX 7900 XTX
title: 2c508222
seconds: 60
exit: 0x0
frames shown: 949 (PresentX 950)
presents per 2 s (last 3): 26 35 39
device removals: 0
crashes: 0
peak commit: 15483 MB
xcl-smoke v1
commit: ed2f33c4180389ab3d926995aff111f5c987bae2
gpu: AMD Radeon RX 7900 XTX
title: 2c508222
seconds: 60
exit: 0x0
frames shown: 1355 (PresentX 1356)
presents per 2 s (last 3): 58 56 57
device removals: 0
crashes: 0
peak commit: 15483 MB

Not tested

  • Interaction with #501's sparse::known_writable fast path (not on main yet); merge order should be fine — both can sit above the VirtualQuery walk.
  • NVIDIA / wave32-only GPUs (smoke and suite were on RDNA3).

AI use

Implemented, tested, smoke runs, and PR description with Cursor (Composer). Plan posted on #626 / #278 before landing the complete PR.

<!-- greyfinch-sync:ivall/xcl:issue:5464221402 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/523). Originally posted by [Grimkaaah](https://github.com/Grimkaaah) on 2026-11-24T01:16:49Z. --- Fixes #626 (item 3 of #278: `is_writable` guards). Items 1–2 are already on `main`; item 4 is #321. Complements #501 (sparse-window fast path) — this PR fixes the VirtualQuery fallback that #501 still uses. Emulated `CLZERO` / `ClzeroLoop` asked whether the destination was writable with a **single** `VirtualQuery`. That was wrong in four ways: 1. **`PAGE_GUARD`.** `PAGE_READWRITE | PAGE_GUARD` (0x104) passed `& (PAGE_READWRITE | PAGE_EXECUTE_READWRITE) != 0`, so the VEH would write through a guard page instead of letting the real fault happen. 2. **One region only.** A `ClzeroLoop` can cover adjacent committed runs with different protect; one query only sees the first. 3. **Unchecked `va + bytes`.** A wrapping end was undefined. 4. **Lazy physical pages.** A page still in `MEM_RESERVE` (lazy map) made `is_writable` false → `0xC000001D`, instead of committing via `lazy::ensure` and zeroing. **What is in it** - `eh::is_writable` now matches the shape of `dstorage::writable`: `checked_add` → `lazy::ensure` → UMA coherent-window fast path → walk every `VirtualQuery` region covering `[va, end)`, requiring a writable protect (`READWRITE` / `WRITECOPY` / `EXECUTE_*`) and **no** `PAGE_GUARD`. - Unit tests (VirtualAlloc only): guard refused then accepted after `VirtualProtect`; `PAGE_NOACCESS` and wrapping end; span across two differently-protected committed pages; reserved hole fails; lazy page commits through `ensure`; CLZERO on a guard page returns 0 without clearing the guard. **Tested** - Machine: Windows 11, AMD Radeon RX 7900 XTX, MSVC, rustc from `rust-toolchain.toml`. - `cargo test -p xcl --lib eh::tests -- --nocapture`: **8 passed**, 0 failed. - `cargo test -p xcl --lib -- --test-threads=4`: **648 passed**, 0 failed, 21 ignored; 0 GPU `SKIPPED`. - Head commit of this PR: `ed2f33c`. **Regression run** Same title and wall time on `main` and on this PR's head (clean tree): ``` xcl-smoke v1 commit: 3db536ebe231418d76e8d6e52ccee0b47330a522 gpu: AMD Radeon RX 7900 XTX title: 2c508222 seconds: 60 exit: 0x0 frames shown: 949 (PresentX 950) presents per 2 s (last 3): 26 35 39 device removals: 0 crashes: 0 peak commit: 15483 MB ``` ``` xcl-smoke v1 commit: ed2f33c4180389ab3d926995aff111f5c987bae2 gpu: AMD Radeon RX 7900 XTX title: 2c508222 seconds: 60 exit: 0x0 frames shown: 1355 (PresentX 1356) presents per 2 s (last 3): 58 56 57 device removals: 0 crashes: 0 peak commit: 15483 MB ``` **Not tested** - Interaction with #501's `sparse::known_writable` fast path (not on `main` yet); merge order should be fine — both can sit above the VirtualQuery walk. - NVIDIA / wave32-only GPUs (smoke and suite were on RDNA3). **AI use** Implemented, tested, smoke runs, and PR description with Cursor (Composer). Plan posted on #626 / #278 before landing the complete PR.
brothernog commented 2026-11-24 07:05:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by brothernog on 2026-11-24T01:42:47Z.


Tested 056cb61 on an RTX 3050 (driver 610.88), Windows 11 Home 26300, Rust 1.100.0, debug:

  • cargo test -p xcl --lib eh::tests: 8 passed.
  • Negative control: I swapped in main's is_writable and kept the new tests.
    • is_writable_guards_regions_overflow_and_lazy_pages fails at "PAGE_GUARD must not count as writable".
    • clzero_refuses_a_guard_page kills the test process with 0x80000001 (STATUS_GUARD_PAGE_VIOLATION): the old CLZERO wrote through the guard.
  • cargo build --workspace then cargo test --workspace --no-fail-fast -- --test-threads=4: 679 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.

The new is_writable has the same steps as dstorage::writable (checked end, lazy::ensure, coherent window, region walk without PAGE_GUARD), plus a next <= at guard.

On the interaction with #501, which the description mentions: #501 puts sparse::known_writable before this walk. On my machine its working-set check reports guarded, no-access and read-only pages as writable, details on #501. For a committed sparse-window page a title has guarded, CLZERO would then skip this PR's PAGE_GUARD check. Whichever merges second may want to keep the guard check ahead of that fast path.

This review was AI-assisted.

<!-- greyfinch-sync:ivall/xcl:comment:7119372963 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/523#issuecomment-7119372963). Originally posted by [brothernog](https://github.com/brothernog) on 2026-11-24T01:42:47Z. --- Tested `056cb61` on an RTX 3050 (driver 610.88), Windows 11 Home 26300, Rust 1.100.0, debug: - `cargo test -p xcl --lib eh::tests`: 8 passed. - Negative control: I swapped in `main`'s `is_writable` and kept the new tests. - `is_writable_guards_regions_overflow_and_lazy_pages` fails at "PAGE_GUARD must not count as writable". - `clzero_refuses_a_guard_page` kills the test process with `0x80000001` (STATUS_GUARD_PAGE_VIOLATION): the old CLZERO wrote through the guard. - `cargo build --workspace` then `cargo test --workspace --no-fail-fast -- --test-threads=4`: 679 passed, 0 failed, 41 ignored. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. The new `is_writable` has the same steps as `dstorage::writable` (checked end, `lazy::ensure`, coherent window, region walk without `PAGE_GUARD`), plus a `next <= at` guard. On the interaction with #501, which the description mentions: #501 puts `sparse::known_writable` before this walk. On my machine its working-set check reports guarded, no-access and read-only pages as writable, details on #501. For a committed sparse-window page a title has guarded, CLZERO would then skip this PR's `PAGE_GUARD` check. Whichever merges second may want to keep the guard check ahead of that fast path. This review was AI-assisted.
eizispark commented 2026-11-24 07:05:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by eizispark on 2026-11-24T02:30:16Z.


Hardware check of 056cb61ac7506e423c307832c88e009720fd2091 (verified clean merge with main cb868b2): pass.

Tested

  • Hardware: AMD Radeon RX 9070 XT (RDNA4, driver 32.0.32015.16001), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11, rustc 1.100.0 (0ef1bc386 2026-11-09), release + test profile
  • cargo test --workspace -- --test-threads=4: 679 passed, 0 failed, 41 ignored (GPU tests skipped on this adapter: none)
  • cargo test -p xcl --lib eh::tests: 8 passed, 0 failed

Regression run
main (9ce2070):

xcl-smoke v1
commit: 9ce2070eccf436d7bd38601c90407da447df34f3
gpu: AMD Radeon RX 9070 XT
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1213 (PresentX 1213)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15615 MB

PR (056cb61):

xcl-smoke v1
commit: 056cb61ac7506e423c307832c88e009720fd2091
gpu: AMD Radeon RX 9070 XT
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1576 (PresentX 1576)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14759 MB

Not tested

  • wave32-only GPUs (NVIDIA / Intel); gameplay past the menus; combined merge order with #501

AI use

  • Antigravity (Gemini 4 Carbon) ran the build, test suite, and scripts/smoke.ps1 harness on this machine and formatted this report.
<!-- greyfinch-sync:ivall/xcl:comment:7120209224 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/523#issuecomment-7120209224). Originally posted by [eizispark](https://github.com/eizispark) on 2026-11-24T02:30:16Z. --- Hardware check of `056cb61ac7506e423c307832c88e009720fd2091` (verified clean merge with `main` `cb868b2`): **pass**. **Tested** - Hardware: AMD Radeon RX 9070 XT (RDNA4, driver 32.0.32015.16001), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11, `rustc 1.100.0 (0ef1bc386 2026-11-09)`, release + test profile - `cargo test --workspace -- --test-threads=4`: `679 passed, 0 failed, 41 ignored` (GPU tests skipped on this adapter: `none`) - `cargo test -p xcl --lib eh::tests`: `8 passed, 0 failed` **Regression run** `main` (`9ce2070`): ``` xcl-smoke v1 commit: 9ce2070eccf436d7bd38601c90407da447df34f3 gpu: AMD Radeon RX 9070 XT title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1213 (PresentX 1213) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15615 MB ``` PR (`056cb61`): ``` xcl-smoke v1 commit: 056cb61ac7506e423c307832c88e009720fd2091 gpu: AMD Radeon RX 9070 XT title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1576 (PresentX 1576) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14759 MB ``` **Not tested** - wave32-only GPUs (NVIDIA / Intel); gameplay past the menus; combined merge order with #501 **AI use** - Antigravity (Gemini 4 Carbon) ran the build, test suite, and `scripts/smoke.ps1` harness on this machine and formatted this report.
Grimkaaah commented 2026-11-24 07:05:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Grimkaaah on 2026-11-24T02:44:11Z.


Rebased onto current main (3db536e), linked to dedicated issue #626, and filled Regression run with real xcl-smoke blocks (main + head ed2f33c, GTA6 60s, RX 7900 XTX).

<!-- greyfinch-sync:ivall/xcl:comment:7120430599 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/523#issuecomment-7120430599). Originally posted by [Grimkaaah](https://github.com/Grimkaaah) on 2026-11-24T02:44:11Z. --- Rebased onto current main (3db536e), linked to dedicated issue #626, and filled Regression run with real xcl-smoke blocks (main + head ed2f33c, GTA6 60s, RX 7900 XTX).
bunbeans2-arch commented 2026-11-24 07:06:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bunbeans2-arch on 2026-11-24T04:43:46Z.


Test report for ed2f33c4180389ab3d926995aff111f5c987bae2 on an Intel CPU without CLZERO (i9-9900K), where the emulated CLZERO path this PR changes is the one taken. The other runs here were on RDNA3 and on a Ryzen 7 9800X3D, which runs CLZERO itself.

Tested

  • Intel Core i9-9900K (CPUID: no CLZERO, CLWB, RDPRU, RDPID, MONITORX, SSE4a), AMD Radeon RX 9070 XT 16 GB (Adrenalin driver 32.0.32015.7029), 32 GB RAM, Windows 11 Pro 23H2 build 22631.6199, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug.
  • This PR's head as is (base 3db536e): cargo build --workspace + cargo test --workspace -- --test-threads=4: 688 passed, 0 failed, 41 ignored, 0 SKIPPED (D3D12 backend on the RX 9070 XT); eh::tests::clzero_refuses_a_guard_page and eh::tests::is_writable_guards_regions_overflow_and_lazy_pages pass. Control, main f4ce27c: 701 passed, 0 failed, 41 ignored.
  • Real faults (a temporary test module appended to eh.rs, not part of this PR; its source is in my report on #321: https://github.com/ivall/xcl/pull/321#issuecomment-7122269978), on this PR's head merged onto main f4ce27c (clean merge): the instructions run for real, the CPU raises STATUS_ILLEGAL_INSTRUCTION and eh's handler takes it.
    • clzero at a line in a read-write buffer: 1 fault, that line zeroed and the bytes around it left as they were.
    • the CLZERO loop (clzero; add rax, 0x40; cmp rax, rdx; jb) over 0x400 bytes: 1 fault, the 0x400 bytes zeroed and the rest left as it was.
    • RDPRU, RDPID, MONITORX, MWAITX, EXTRQ and INSERTQ: 1 fault each, results as the test expects (the same as on main).

Not tested

  • A retail title or a scripts/smoke.ps1 run (no game files were used), a release build.
  • A real CLZERO fault on a guard page, a lazily committed page or a span across regions (only the unit tests above cover those), other Intel generations.
  • On the same merge, the multi-threaded CLWB part of that test fails as it does on main: that is the CLWB hot-patch race of #321, which this PR does not touch.

AI use

  • Claude Code. The real-fault test and the runs: Claude Fable 5.2; this report: Claude Opus 5.5 (the session's model was switched partway). All numbers come from the runs above on this machine.
<!-- greyfinch-sync:ivall/xcl:comment:7122283949 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/523#issuecomment-7122283949). Originally posted by [bunbeans2-arch](https://github.com/bunbeans2-arch) on 2026-11-24T04:43:46Z. --- Test report for `ed2f33c4180389ab3d926995aff111f5c987bae2` on an **Intel CPU without CLZERO** (i9-9900K), where the emulated CLZERO path this PR changes is the one taken. The other runs here were on RDNA3 and on a Ryzen 7 9800X3D, which runs CLZERO itself. **Tested** - Intel Core i9-9900K (CPUID: no CLZERO, CLWB, RDPRU, RDPID, MONITORX, SSE4a), AMD Radeon RX 9070 XT 16 GB (Adrenalin driver 32.0.32015.7029), 32 GB RAM, Windows 11 Pro 23H2 build 22631.6199, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug. - This PR's head as is (base `3db536e`): `cargo build --workspace` + `cargo test --workspace -- --test-threads=4`: **688 passed, 0 failed, 41 ignored**, 0 `SKIPPED` (D3D12 backend on the RX 9070 XT); `eh::tests::clzero_refuses_a_guard_page` and `eh::tests::is_writable_guards_regions_overflow_and_lazy_pages` pass. Control, `main` `f4ce27c`: 701 passed, 0 failed, 41 ignored. - **Real faults** (a temporary test module appended to `eh.rs`, not part of this PR; its source is in my report on #321: https://github.com/ivall/xcl/pull/321#issuecomment-7122269978), on this PR's head merged onto `main` `f4ce27c` (clean merge): the instructions run for real, the CPU raises `STATUS_ILLEGAL_INSTRUCTION` and `eh`'s handler takes it. - `clzero` at a line in a read-write buffer: 1 fault, that line zeroed and the bytes around it left as they were. - the CLZERO loop (`clzero; add rax, 0x40; cmp rax, rdx; jb`) over 0x400 bytes: 1 fault, the 0x400 bytes zeroed and the rest left as it was. - RDPRU, RDPID, MONITORX, MWAITX, EXTRQ and INSERTQ: 1 fault each, results as the test expects (the same as on `main`). **Not tested** - A retail title or a `scripts/smoke.ps1` run (no game files were used), a release build. - A real CLZERO fault on a guard page, a lazily committed page or a span across regions (only the unit tests above cover those), other Intel generations. - On the same merge, the multi-threaded CLWB part of that test fails as it does on `main`: that is the CLWB hot-patch race of #321, which this PR does not touch. **AI use** - Claude Code. The real-fault test and the runs: Claude Fable 5.2; this report: Claude Opus 5.5 (the session's model was switched partway). All numbers come from the runs above on this machine.
raylitebull commented 2026-11-24 11:05:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-24T10:40:22Z.


Code/CI review only (not independently runtime-tested by me): clean merge and PR description green (just awaiting CI workflow approval). Hardens eh::is_writable for PAGE_GUARD, multi-region spans, and lazy pages (#626). Recommend approving CI and merging, @ivall.

<!-- greyfinch-sync:ivall/xcl:comment:7129091830 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/523#issuecomment-7129091830). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-24T10:40:22Z. --- Code/CI review only (not independently runtime-tested by me): clean merge and `PR description` green (just awaiting CI workflow approval). Hardens `eh::is_writable` for `PAGE_GUARD`, multi-region spans, and lazy pages (#626). Recommend approving CI and merging, @ivall.
DavidM1911 commented 2026-11-25 14:10:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T13:43:25Z.


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:7164194562 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/523#issuecomment-7164194562). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T13:43:25Z. --- 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!
upipibi commented 2026-11-25 21:05:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-25T20:25:46Z.


NVIDIA test report for ed2f33c (head as is, base 3db536e), for #1607's "one more test report" list. RTX 3070 8 GB (Ampere, 32-lane waves), driver 616.56, Windows 11, debug, after cargo build --workspace:

  • cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2: 679 passed, 0 failed, 41 ignored. The end-to-end title tests pass.
  • Skipped hle::xaudio2, because its tests fail or hang on this machine on main too. The PR doesn't touch it.
  • SKIPPED lines: 2, both no wave64 on this card.

AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only; no title run.

<!-- greyfinch-sync:ivall/xcl:comment:7173657782 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/523#issuecomment-7173657782). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-25T20:25:46Z. --- NVIDIA test report for `ed2f33c` (head as is, base `3db536e`), for #1607's "one more test report" list. RTX 3070 8 GB (Ampere, 32-lane waves), driver 616.56, Windows 11, debug, after `cargo build --workspace`: - `cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2`: **679 passed, 0 failed, 41 ignored**. The end-to-end title tests pass. - Skipped `hle::xaudio2`, because its tests fail or hang on this machine on `main` too. The PR doesn't touch it. - SKIPPED lines: 2, both `no wave64` on this card. AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only; no title run.
github-actions[bot] commented 2026-11-30 08:39:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-30T08:39:38Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7273183678 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/523#issuecomment-7273183678). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-30T08:39:38Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 03:39:14 +00:00 (Migrated from github.com)

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


Triage (#1607) – head ed2f33c

No open or merged PR makes the same change. Main's eh::is_writable still uses one VirtualQuery, accepts PAGE_READWRITE | PAGE_GUARD, adds va + bytes unchecked and does not call lazy::ensure. #501, already adapted on main as a078094, added the sparse::known_writable fast path to the same function, and #1034 also edits it. The PR conflicts with main, and the rebase must keep known_writable ahead of the new region walk. Otherwise the multi-region walk would bring back the gigabyte VirtualQuery walks in sparse windows.
No problems found in the diff. is_writable(_, 0) now returns true where it returned false.
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:7299927353 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/523#issuecomment-7299927353). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:39:14Z. --- **Triage (#1607)** – head ed2f33c No open or merged PR makes the same change. Main's `eh::is_writable` still uses one `VirtualQuery`, accepts `PAGE_READWRITE | PAGE_GUARD`, adds `va + bytes` unchecked and does not call `lazy::ensure`. #501, already adapted on main as a078094, added the `sparse::known_writable` fast path to the same function, and #1034 also edits it. The PR conflicts with main, and the rebase must keep `known_writable` ahead of the new region walk. Otherwise the multi-region walk would bring back the gigabyte `VirtualQuery` walks in sparse windows. No problems found in the diff. `is_writable(_, 0)` now returns true where it returned false. 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/523:upstream-pr/523'
git switch 'upstream-pr/523'

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