Tests: align XMemVirtualQuery buffers and verify CPU flags #645

Open
yaandrei2000 wants to merge 1 commit from upstream-pr/650 into main
yaandrei2000 commented 2026-11-24 02:53:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by yaandrei2000 on 2026-11-24T02:53:17Z.


Fix intermittent failures in the XMemVirtualQuery tests. The old byte array could be misaligned for VirtualQueryEx on Windows x64. Zero-initialized flags could also mask a missing write for reserved or guarded pages. Related to #656.

What is in it

  • In crates/xcl/src/hle/kernelx.rs, share a C-layout QueryInfo between the two tests. Check the buffer layout, start each query with cpu_flags = u32::MAX, and verify MEM_RESERVE for the reserved case and MEM_COMMIT with PAGE_READWRITE | PAGE_GUARD for the guard case.

Tested

Tested commit 7fdea657c96e45e9630b6db9016d7b5f8b7746cb in a clean worktree based on f4ce27ceb6d1b0576d0c659b713b674778bf1968. Windows 11 build 26300.9974, Ryzen 5 5500, GTX 1660 Ti (driver 617.42), Rust 1.88.0 (x86_64-pc-windows-msvc), debug, DXC 1.9.2609.5.

$env:XCL_DXC_DIR = 'C:\Tools\DXC\bin\x64'
cargo test -p xcl --lib xmem_virtual_query -- --test-threads=1
cargo build --workspace
cargo test --workspace --no-fail-fast -- --test-threads=4
  • Both focused tests passed on the final commit with the original runtime. In a separate experiment on the same test diff, a temporary mutation wrote cpu_flags only for readable pages. Both tests from 53301d8 still passed. Both updated tests failed on the reserved and guard-page cases with cpu_flags & 3 == 3 (expected 0).
  • The workspace run on the final commit completed all 17 test binaries. Cargo reported 698 passed, 3 failed, and 41 ignored (exit 101).
  • The control run used the same build and --no-fail-fast commands on clean f4ce27c. It reported 697 passed, 4 failed, and 41 ignored. Both trees failed the cubemap VRAM reuse assertion in placed_title_textures_share_vram_and_preserve_pixels. The resulting poisoned locks also failed transitions_apply_when_their_list_is_submitted and d32s8_targets_take_their_own_size_of_video_memory. Clean main also failed xmem_virtual_query_marks_cpu_readable_memory (returned 0, expected 1). Cubemap check #447 and Poisoned test locks #673
  • Cargo counts two Wave64 SKIPPED results as passes in each workspace run: gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware.

Earlier independent checks of 53301d8

  • RTX 4060, driver 621.01, i5-12600KF, Windows 11 build 26200, Rust 1.90.0, debug. cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4 on the exact commit reported 688 passed, 0 failed, 41 ignored, and two Wave64 skips included in the pass count. Both focused tests passed. NVIDIA report
  • Radeon RX 9060 XT (RDNA4), driver 32.0.32029.2010, Ryzen 7 5700X, Windows 11 build 26200, Rust 1.100.0, debug. A local merge of 53301d8 onto 91f9a5e reported 692 passed, 0 failed, 41 ignored, and 0 skips. Both focused tests passed. The commands were cargo build --workspace and cargo test --workspace -- --test-threads=4. AMD report

Regression run

Please apply the test-only label after reviewing this revision.

Not tested

Retail titles, cases requiring external XCL_SAMPLE_* data, release builds, and the updated tests on AMD GPUs.

AI use

ChatGPT (GPT-6.2) helped diagnose and write the original fix. OpenAI Codex (GPT-6 family, exact variant unavailable) strengthened the tests, ran and checked the mutation and workspace tests, and drafted this description.

<!-- greyfinch-sync:ivall/xcl:issue:5465184049 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/650). Originally posted by [yaandrei2000](https://github.com/yaandrei2000) on 2026-11-24T02:53:17Z. --- Fix intermittent failures in the XMemVirtualQuery tests. The old byte array could be misaligned for VirtualQueryEx on Windows x64. Zero-initialized flags could also mask a missing write for reserved or guarded pages. Related to #656. **What is in it** - In `crates/xcl/src/hle/kernelx.rs`, share a C-layout `QueryInfo` between the two tests. Check the buffer layout, start each query with `cpu_flags = u32::MAX`, and verify `MEM_RESERVE` for the reserved case and `MEM_COMMIT` with `PAGE_READWRITE | PAGE_GUARD` for the guard case. **Tested** Tested commit `7fdea657c96e45e9630b6db9016d7b5f8b7746cb` in a clean worktree based on `f4ce27ceb6d1b0576d0c659b713b674778bf1968`. Windows 11 build 26300.9974, Ryzen 5 5500, GTX 1660 Ti (driver 617.42), Rust 1.88.0 (x86_64-pc-windows-msvc), debug, DXC 1.9.2609.5. ```powershell $env:XCL_DXC_DIR = 'C:\Tools\DXC\bin\x64' cargo test -p xcl --lib xmem_virtual_query -- --test-threads=1 cargo build --workspace cargo test --workspace --no-fail-fast -- --test-threads=4 ``` - Both focused tests passed on the final commit with the original runtime. In a separate experiment on the same test diff, a temporary mutation wrote `cpu_flags` only for readable pages. Both tests from `53301d8` still passed. Both updated tests failed on the reserved and guard-page cases with `cpu_flags & 3 == 3` (expected `0`). - The workspace run on the final commit completed all 17 test binaries. Cargo reported 698 passed, 3 failed, and 41 ignored (exit 101). - The control run used the same build and `--no-fail-fast` commands on clean `f4ce27c`. It reported 697 passed, 4 failed, and 41 ignored. Both trees failed the cubemap VRAM reuse assertion in `placed_title_textures_share_vram_and_preserve_pixels`. The resulting poisoned locks also failed `transitions_apply_when_their_list_is_submitted` and `d32s8_targets_take_their_own_size_of_video_memory`. Clean `main` also failed `xmem_virtual_query_marks_cpu_readable_memory` (returned `0`, expected `1`). [Cubemap check #447](https://github.com/ivall/xcl/pull/447) and [Poisoned test locks #673](https://github.com/ivall/xcl/pull/673) - Cargo counts two Wave64 `SKIPPED` results as passes in each workspace run: `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware`. Earlier independent checks of `53301d8` - RTX 4060, driver 621.01, i5-12600KF, Windows 11 build 26200, Rust 1.90.0, debug. `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4` on the exact commit reported 688 passed, 0 failed, 41 ignored, and two Wave64 skips included in the pass count. Both focused tests passed. [NVIDIA report](https://github.com/ivall/xcl/pull/650#issuecomment-7120890019) - Radeon RX 9060 XT (RDNA4), driver 32.0.32029.2010, Ryzen 7 5700X, Windows 11 build 26200, Rust 1.100.0, debug. A local merge of `53301d8` onto `91f9a5e` reported 692 passed, 0 failed, 41 ignored, and 0 skips. Both focused tests passed. The commands were `cargo build --workspace` and `cargo test --workspace -- --test-threads=4`. [AMD report](https://github.com/ivall/xcl/pull/650#issuecomment-7121207041) **Regression run** Please apply the `test-only` label after reviewing this revision. **Not tested** Retail titles, cases requiring external `XCL_SAMPLE_*` data, release builds, and the updated tests on AMD GPUs. **AI use** ChatGPT (GPT-6.2) helped diagnose and write the original fix. OpenAI Codex (GPT-6 family, exact variant unavailable) strengthened the tests, ran and checked the mutation and workspace tests, and drafted this description.
xelerb-debug commented 2026-11-24 07:05:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by xelerb-debug on 2026-11-24T03:13:35Z.


Test report for 53301d8c86b0d799a1fa18792a2df87acecb6751 (this PR's head)

Tested

  • NVIDIA GeForce RTX 4060 (driver 621.01), Intel Core i5-12600KF, Windows 11 Pro build 26200, Rust 1.90.0 (stable-x86_64-pc-windows-msvc), debug
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4 on the head: 688 passed, 0 failed, 41 ignored (lib: 648 passed, 0 failed, 21 ignored; integration tests and doc-tests: 40 passed, 0 failed, 20 ignored)
  • SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64)
  • On the base commit (cedf8ce), cargo test -p xcl --lib xmem_virtual_query fails xmem_virtual_query_marks_cpu_readable_memory 3 times out of 3. It also failed on 508a0c7. With this PR, both xmem_virtual_query tests pass.
  • Root cause, measured: VirtualQueryEx returns 0 with ERROR_NOACCESS (998) when the output buffer sits at an offset of 1 or 4 from a 16-byte-aligned buffer, and succeeds at offsets 0 and 8. The old [u8; 64] buffer has 1-byte alignment, so whether the test passed depended on the stack layout. On Rust 1.90 it failed every run, and adding any local variable made it pass. QueryInfo takes the 8-byte alignment of MEMORY_BASIC_INFORMATION, which fixes this.
  • The PR merges into the current main (dd2ae9a) without conflicts (git merge-tree); the merged tree was not tested.

Not tested

  • AMD / RDNA GPUs, wave64 paths, release build, the merged tree with current main

AI use

  • Claude Code, Claude Opus 5.5: ran the tests above and wrote this report; I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7120890019 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/650#issuecomment-7120890019). Originally posted by [xelerb-debug](https://github.com/xelerb-debug) on 2026-11-24T03:13:35Z. --- Test report for 53301d8c86b0d799a1fa18792a2df87acecb6751 (this PR's head) **Tested** - NVIDIA GeForce RTX 4060 (driver 621.01), Intel Core i5-12600KF, Windows 11 Pro build 26200, Rust 1.90.0 (`stable-x86_64-pc-windows-msvc`), debug - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4` on the head: **688 passed, 0 failed, 41 ignored** (lib: 648 passed, 0 failed, 21 ignored; integration tests and doc-tests: 40 passed, 0 failed, 20 ignored) - SKIPPED: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64) - On the base commit (cedf8ce), `cargo test -p xcl --lib xmem_virtual_query` fails `xmem_virtual_query_marks_cpu_readable_memory` 3 times out of 3. It also failed on 508a0c7. With this PR, both `xmem_virtual_query` tests pass. - Root cause, measured: `VirtualQueryEx` returns 0 with `ERROR_NOACCESS` (998) when the output buffer sits at an offset of 1 or 4 from a 16-byte-aligned buffer, and succeeds at offsets 0 and 8. The old `[u8; 64]` buffer has 1-byte alignment, so whether the test passed depended on the stack layout. On Rust 1.90 it failed every run, and adding any local variable made it pass. `QueryInfo` takes the 8-byte alignment of `MEMORY_BASIC_INFORMATION`, which fixes this. - The PR merges into the current `main` (dd2ae9a) without conflicts (`git merge-tree`); the merged tree was not tested. **Not tested** - AMD / RDNA GPUs, wave64 paths, release build, the merged tree with current `main` **AI use** - Claude Code, Claude Opus 5.5: ran the tests above and wrote this report; I checked it before posting.
MesshM commented 2026-11-24 07:05:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T03:33:21Z.


Test run of 53301d8c86b0d799a1fa18792a2df87acecb6751 on AMD RDNA4. I merged it onto current main 91f9a5e locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 692 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 652 passed, 0 failed, 21 ignored
  • 0 SKIPPED; xmem_virtual_query_marks_cpu_readable_memory and xmem_virtual_query_excludes_guard_pages pass.

Review: Duplicate of #656 (open), which fixes the same misaligned buffer with an align(8) wrapper and also clears the buffer between the two queries; this one uses a #[repr(C)] struct with offset_of checks (cpu_flags at 48, size 64), which documents the layout. Only one should land. The fix itself is right: MEMORY_BASIC_INFORMATION needs 8-byte alignment.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

<!-- greyfinch-sync:ivall/xcl:comment:7121207041 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/650#issuecomment-7121207041). Originally posted by [MesshM](https://github.com/MesshM) on 2026-11-24T03:33:21Z. --- Test run of `53301d8c86b0d799a1fa18792a2df87acecb6751` on AMD RDNA4. I merged it onto current `main` `91f9a5e` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **692 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 652 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; `xmem_virtual_query_marks_cpu_readable_memory` and `xmem_virtual_query_excludes_guard_pages` pass. **Review:** **Duplicate of #656** (open), which fixes the same misaligned buffer with an `align(8)` wrapper and also clears the buffer between the two queries; this one uses a `#[repr(C)]` struct with `offset_of` checks (`cpu_flags` at 48, size 64), which documents the layout. Only one should land. The fix itself is right: `MEMORY_BASIC_INFORMATION` needs 8-byte alignment. **Not tested:** no retail title or regression run (I have no unpacked game), no `XCL_SAMPLE_*` tests, release build; the PR's head on its old base was not run, only its merge onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
ItsMrDubey commented 2026-11-24 07:06:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ItsMrDubey on 2026-11-24T04:57:20Z.


Test report for 7fdea657c96e45e9630b6db9016d7b5f8b7746cb (this PR's head)

Tested

  • NVIDIA GeForce RTX 4070 Ti 12 GB (Ada), driver 617.14; Intel Core i9-10900K, 32 GB RAM; Windows 11 Pro build 26300
  • Rust 1.88.0 (stable-x86_64-pc-windows-msvc), debug; DXC 1.9.2602.17 from Windows SDK 10.0.26100
cargo build --workspace
cargo test --workspace --no-fail-fast -- --test-threads=4

17 test binaries: 698 passed, 3 failed, 41 ignored. Same machine, main 64b3f3559: 700 passed, 1 failed, 41 ignored.

This PR's tests:

  • hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory: ok
  • hle::kernelx::tests::xmem_virtual_query_excludes_guard_pages: ok

On this machine the failure is not intermittent: xmem_virtual_query_marks_cpu_readable_memory fails on main 64b3f3559 on every run (5 of 5 single-test reruns, XMemVirtualQuery returns 0), and passes with this PR.

Failures:

  • placed_title_textures_share_vram_and_preserve_pixels failed at its cubemap reuse check, and two tests failed on the lock it poisoned (transitions_apply_when_their_list_is_submitted, d32s8_targets_take_their_own_size_of_video_memory). That is the known flake in #718 (fixed by #447), not this PR.

SKIPPED (no wave64 on this GPU): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.

AI use: Claude Code (Claude Opus 5.5) ran the builds and tests and wrote this report from their output.

<!-- greyfinch-sync:ivall/xcl:comment:7122489607 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/650#issuecomment-7122489607). Originally posted by [ItsMrDubey](https://github.com/ItsMrDubey) on 2026-11-24T04:57:20Z. --- Test report for `7fdea657c96e45e9630b6db9016d7b5f8b7746cb` (this PR's head) **Tested** - NVIDIA GeForce RTX 4070 Ti 12 GB (Ada), driver 617.14; Intel Core i9-10900K, 32 GB RAM; Windows 11 Pro build 26300 - Rust 1.88.0 (`stable-x86_64-pc-windows-msvc`), debug; DXC 1.9.2602.17 from Windows SDK 10.0.26100 ``` cargo build --workspace cargo test --workspace --no-fail-fast -- --test-threads=4 ``` 17 test binaries: **698 passed, 3 failed, 41 ignored**. Same machine, `main` `64b3f3559`: 700 passed, 1 failed, 41 ignored. This PR's tests: - `hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory`: ok - `hle::kernelx::tests::xmem_virtual_query_excludes_guard_pages`: ok On this machine the failure is not intermittent: `xmem_virtual_query_marks_cpu_readable_memory` fails on `main` `64b3f3559` on every run (5 of 5 single-test reruns, `XMemVirtualQuery` returns 0), and passes with this PR. Failures: - `placed_title_textures_share_vram_and_preserve_pixels` failed at its cubemap reuse check, and two tests failed on the lock it poisoned (`transitions_apply_when_their_list_is_submitted`, `d32s8_targets_take_their_own_size_of_video_memory`). That is the known flake in #718 (fixed by #447), not this PR. SKIPPED (no wave64 on this GPU): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. AI use: Claude Code (Claude Opus 5.5) ran the builds and tests and wrote this report from their output.
madaraXor commented 2026-11-24 11:05:57 +00:00 (Migrated from github.com)

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


Tested on Windows 10 with Rust 1.90, where main fails this test every time

  • main 6efdabc, then the same tree with this PR's diff applied (gh pr diff 650, head 7fdea65). AMD Radeon RX 6700 XT, Ryzen 5 5600X, Windows 10 Pro 22H2 (19045.6466), Rust 1.90.0 stable-x86_64-pc-windows-msvc, debug.
  • xcl-<hash>.exe kernelx::tests::xmem_virtual_query --test-threads=1, 5 runs each:
    • main: xmem_virtual_query_marks_cpu_readable_memory fails 5 of 5 (panic at kernelx.rs:2070); xmem_virtual_query_excludes_guard_pages passes.
    • with this PR: both pass 5 of 5.
  • The cause on this machine, from a temporary probe on 09940bb (reverted): the [0u8; 64] buffer sat at an address 4 mod 8 and VirtualQueryEx failed with ERROR_NOACCESS (998), so XMemVirtualQuery returned 0.

Not tested: the whole suite with this PR applied; #656 (same failure, smaller change).

AI use: Claude Code, Claude Opus 5.5 ran the tests and wrote this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7129187492 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/650#issuecomment-7129187492). Originally posted by [madaraXor](https://github.com/madaraXor) on 2026-11-24T10:44:44Z. --- **Tested on Windows 10 with Rust 1.90, where `main` fails this test every time** - `main` `6efdabc`, then the same tree with this PR's diff applied (`gh pr diff 650`, head `7fdea65`). AMD Radeon RX 6700 XT, Ryzen 5 5600X, Windows 10 Pro 22H2 (19045.6466), Rust 1.90.0 `stable-x86_64-pc-windows-msvc`, debug. - `xcl-<hash>.exe kernelx::tests::xmem_virtual_query --test-threads=1`, 5 runs each: - `main`: `xmem_virtual_query_marks_cpu_readable_memory` fails 5 of 5 (panic at `kernelx.rs:2070`); `xmem_virtual_query_excludes_guard_pages` passes. - with this PR: both pass 5 of 5. - The cause on this machine, from a temporary probe on `09940bb` (reverted): the `[0u8; 64]` buffer sat at an address 4 mod 8 and `VirtualQueryEx` failed with `ERROR_NOACCESS` (998), so `XMemVirtualQuery` returned 0. **Not tested:** the whole suite with this PR applied; #656 (same failure, smaller change). AI use: Claude Code, Claude Opus 5.5 ran the tests and wrote this comment.
Toons29 commented 2026-11-25 03:05:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T02:58:49Z.


Regression run of 7fdea657 on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on 4178e888, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14831 MB
xcl-smoke v1
commit: 7fdea657c96e45e9630b6db9016d7b5f8b7746cb
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14809 MB

Against the limits in CONTRIBUTING.md: 100 % of main's frames, 100 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; I checked the blocks before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7151455945 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/650#issuecomment-7151455945). Originally posted by [Toons29](https://github.com/Toons29) on 2026-11-25T02:58:49Z. --- Regression run of `7fdea657` on the retail title, for this PR's **Regression run** section. Both blocks are from `scripts/smoke.ps1` as printed, not edited: `main` on `4178e888`, this PR on its head commit with no uncommitted changes, same title and time. ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14831 MB ``` ``` xcl-smoke v1 commit: 7fdea657c96e45e9630b6db9016d7b5f8b7746cb gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14809 MB ``` Against the limits in CONTRIBUTING.md: 100 % of `main`'s frames, 100 % of its peak commit, no crash, no device removal. AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, `cargo build --release -p xcl`, 60 s, `XCL_NETWORK=0`. This is a regression check only: it does not show whether the run reaches the code this PR changes. AI use: Claude Code (Claude Opus 5.5) built both trees and ran `scripts/smoke.ps1`; I checked the blocks before posting.
Anon64 commented 2026-11-25 09:08:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-25T08:09:52Z.


On current main 568e7db, this test fails every time on my machine. It passes with this PR merged on top.

Tested

  • RTX 3060 12 GB, Windows 11 Home 26200, Rust 1.90.0 MSVC, debug.
  • cargo test --workspace -- --test-threads=4 on main 568e7db: 1097 passed, 1 failed, 26 ignored. The failure is hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory, at kernelx.rs:2285 (CPU flag left: 0, right: 1). SKIPPED tests: the wave64 ones (this adapter has no wave64) and ir_text_assembles_signs_and_runs (no dxil.dll).
  • cargo test -p xcl --lib xmem_virtual_query_marks on main: failed 5 of 5 runs.
  • This PR's head 7fdea65 merged onto 568e7db (clean merge), cargo test -p xcl --lib xmem_virtual_query: 2 passed, 0 failed in each of 5 runs.

Not tested

  • The rest of the suite on the merged tree, and the retail title (this is a test-only change).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7156684180 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/650#issuecomment-7156684180). Originally posted by [Anon64](https://github.com/Anon64) on 2026-11-25T08:09:52Z. --- On current `main` `568e7db`, this test fails every time on my machine. It passes with this PR merged on top. **Tested** - RTX 3060 12 GB, Windows 11 Home 26200, Rust 1.90.0 MSVC, debug. - `cargo test --workspace -- --test-threads=4` on `main` `568e7db`: 1097 passed, 1 failed, 26 ignored. The failure is `hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory`, at `kernelx.rs:2285` (CPU flag `left: 0, right: 1`). SKIPPED tests: the wave64 ones (this adapter has no wave64) and `ir_text_assembles_signs_and_runs` (no dxil.dll). - `cargo test -p xcl --lib xmem_virtual_query_marks` on `main`: failed 5 of 5 runs. - This PR's head `7fdea65` merged onto `568e7db` (clean merge), `cargo test -p xcl --lib xmem_virtual_query`: 2 passed, 0 failed in each of 5 runs. **Not tested** - The rest of the suite on the merged tree, and the retail title (this is a test-only change). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
DavidM1911 commented 2026-11-25 13:05:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T12:31:34Z.


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:7162492840 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/650#issuecomment-7162492840). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T12:31:34Z. --- 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!
github-actions[bot] commented 2026-11-29 07:42:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:42:37Z.


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:7252641731 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/650#issuecomment-7252641731). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T07:42:37Z. --- 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:53:10 +00:00 (Migrated from github.com)

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


Triage (#1607) – head 7fdea65

#656 (closed, not merged) made part of this change: it aligned the 64-byte buffer of xmem_virtual_query_marks_cpu_readable_memory. This PR does that with a #[repr(C)] QueryInfo, also fixes the PAGE_GUARD test, and checks State / Protect. Main still casts an unaligned [u8; 64] to MEMORY_BASIC_INFORMATION in the first test. Main's newer xmem_virtual_query_writes_the_whole_flag_field_and_gpu_visibility already uses an aligned buffer and is not touched. The PR merges cleanly. No problems found in the diff.
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:7300161916 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/650#issuecomment-7300161916). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:53:10Z. --- **Triage (#1607)** – head 7fdea65 #656 (closed, not merged) made part of this change: it aligned the 64-byte buffer of `xmem_virtual_query_marks_cpu_readable_memory`. This PR does that with a `#[repr(C)]` `QueryInfo`, also fixes the PAGE_GUARD test, and checks `State` / `Protect`. Main still casts an unaligned `[u8; 64]` to `MEMORY_BASIC_INFORMATION` in the first test. Main's newer `xmem_virtual_query_writes_the_whole_flag_field_and_gpu_visibility` already uses an aligned buffer and is not touched. The PR merges cleanly. No problems found in the diff. 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/650:upstream-pr/650'
git switch 'upstream-pr/650'

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