xmem tests fail on Windows 11 26H2 (build 26300.9974) / RX 7900 GRE: 5 tests in victory-hle #8

Open
opened 2026-11-26 03:33:02 +00:00 by github-bot · 2 comments
Owner

@⁠BeTiNSz on GitHub · 2026-11-25 11:32 UTC · original

Summary

cargo test -p victory-hle --lib fails 5 tests, all in modules::xmem, on my machine. The failures are deterministic: they are identical with --test-threads=1, so this is not interference between parallel tests.

Everything else passes (97 passed, 5 failed, 1 ignored). I have not run the game; this is only the test suite and a release build.

Environment

  • OS: Windows 11 26H2, build 26300.9974
  • GPU: AMD Radeon RX 7900 GRE (16 GB)
  • RAM: 32 GB
  • CPU: 9800x3d
  • Rust: rustc 1.98.1 (48a229cea 2026-09-01)
  • Commit: 4cbe9d7

Steps to reproduce

git clone https://github.com/Belobug/VIctory-Belobug-AMD
cd VIctory-Belobug-AMD
cargo test -p victory-hle --lib -- --test-threads=1

Failing tests

  • modules::xmem::tests::a_run_keeps_the_placeholders_it_spans
  • modules::xmem::tests::a_run_maps_across_two_placeholders
  • modules::xmem::tests::a_run_maps_again_after_a_partial_unmap
  • modules::xmem::tests::mapping_no_pages_changes_nothing
  • modules::xmem::tests::physical_pages_map_alias_and_unmap

Actual output

  • a_run_maps_across_two_placeholders (xmem.rs:1549): left 4096, right 8192
  • a_run_maps_again_after_a_partial_unmap (xmem.rs:1524): left 4096, right 8192
  • physical_pages_map_alias_and_unmap (xmem.rs:1330): left 4096, right 8192
  • a_run_keeps_the_placeholders_it_spans (xmem.rs:1578): left (0x1000b0000, 131072), right (0x1000d0000, 131072)
  • mapping_no_pages_changes_nothing (xmem.rs:1382): assertion failed: map_alias(at as u64, a as u64, 0)

Four tests expect 8192 bytes (2 pages) but get 4096 (1 page). In the fifth, the address is 0x20000 lower than expected. The addresses differ slightly between runs, the 4096 vs 8192 values do not.

Full output attached: teste.txt

Notes

  • xtask also has one failing test, policy::tests::repository_passes_policy, because crates/victory-shader/src/emit/lower.rs is 630652 bytes (limit 524288). The README already lists this as a known problem, so I am not reporting it here.
  • cargo build --release -p victory finishes without errors (4 dead-code warnings).

Question

Is this expected on Windows builds other than the one the fork was developed on, or does it point to a bug in how xmem maps physical pages / placeholders? I can run extra diagnostics if useful.

**@⁠BeTiNSz** on GitHub · 2026-11-25 11:32 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/8) ## Summary `cargo test -p victory-hle --lib` fails 5 tests, all in `modules::xmem`, on my machine. The failures are deterministic: they are identical with `--test-threads=1`, so this is not interference between parallel tests. Everything else passes (97 passed, 5 failed, 1 ignored). I have not run the game; this is only the test suite and a release build. ## Environment - OS: Windows 11 26H2, build 26300.9974 - GPU: AMD Radeon RX 7900 GRE (16 GB) - RAM: 32 GB - CPU: 9800x3d - Rust: rustc 1.98.1 (48a229cea 2026-09-01) - Commit: 4cbe9d7 ## Steps to reproduce git clone https://github.com/Belobug/VIctory-Belobug-AMD cd VIctory-Belobug-AMD cargo test -p victory-hle --lib -- --test-threads=1 ## Failing tests - `modules::xmem::tests::a_run_keeps_the_placeholders_it_spans` - `modules::xmem::tests::a_run_maps_across_two_placeholders` - `modules::xmem::tests::a_run_maps_again_after_a_partial_unmap` - `modules::xmem::tests::mapping_no_pages_changes_nothing` - `modules::xmem::tests::physical_pages_map_alias_and_unmap` ## Actual output - `a_run_maps_across_two_placeholders` (xmem.rs:1549): left 4096, right 8192 - `a_run_maps_again_after_a_partial_unmap` (xmem.rs:1524): left 4096, right 8192 - `physical_pages_map_alias_and_unmap` (xmem.rs:1330): left 4096, right 8192 - `a_run_keeps_the_placeholders_it_spans` (xmem.rs:1578): left (0x1000b0000, 131072), right (0x1000d0000, 131072) - `mapping_no_pages_changes_nothing` (xmem.rs:1382): assertion failed: `map_alias(at as u64, a as u64, 0)` Four tests expect 8192 bytes (2 pages) but get 4096 (1 page). In the fifth, the address is 0x20000 lower than expected. The addresses differ slightly between runs, the 4096 vs 8192 values do not. Full output attached: [teste.txt](https://github.com/user-attachments/files/35408972/teste.txt) ## Notes - `xtask` also has one failing test, `policy::tests::repository_passes_policy`, because `crates/victory-shader/src/emit/lower.rs` is 630652 bytes (limit 524288). The README already lists this as a known problem, so I am not reporting it here. - `cargo build --release -p victory` finishes without errors (4 dead-code warnings). ## Question Is this expected on Windows builds other than the one the fork was developed on, or does it point to a bug in how `xmem` maps physical pages / placeholders? I can run extra diagnostics if useful.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:33:02 +00:00
Author
Owner

@⁠MamaLeVrai on GitHub · 2026-11-25 11:43 UTC · original

The same five failures are in #2 (RX 6950 XT, Windows 11 build 26300 too), with the cause found there; two things that may save you time:

  • The "4096" and "8192" are not byte counts or pages. At xmem.rs:1330, 1524 and 1549 the assertions compare query(..).host.State with MEM_RESERVE: 4096 is MEM_COMMIT (0x1000) and 8192 is MEM_RESERVE (0x2000). So these tests find a page still committed where they expect it back to a reservation after an unmap.
  • It is not the OS build: map_whole (added in fa07481) shows a reservation as long as its section with one view, and the tests reserve exactly the section's length. With a local one-line change that makes map_whole return false, all 14 xmem tests pass (details in #2).

AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-25 11:43 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/8#issuecomment-7161423390) The same five failures are in #2 (RX 6950 XT, Windows 11 build 26300 too), with the cause found there; two things that may save you time: - The "4096" and "8192" are not byte counts or pages. At `xmem.rs:1330`, `1524` and `1549` the assertions compare `query(..).host.State` with `MEM_RESERVE`: 4096 is `MEM_COMMIT` (0x1000) and 8192 is `MEM_RESERVE` (0x2000). So these tests find a page still committed where they expect it back to a reservation after an unmap. - It is not the OS build: `map_whole` (added in `fa07481`) shows a reservation as long as its section with one view, and the tests reserve exactly the section's length. With a local one-line change that makes `map_whole` return false, all 14 `xmem` tests pass (details in #2). AI-assisted (Claude Code); no game data.
Author
Owner

@⁠blpeters67 on GitHub · 2026-11-27 00:36 UTC · original

Status check against the current code (no local test run, just the code, history and CI):

  • main (4f62c2a): still has map_whole, the cause identified above. PR #14 fixes it: reservations under 16 MiB stay off the whole-view path, and zero-length map_alias is a no-op. That covers all five failures, and the PR adds two tests.
  • a-publier (the default branch, 4eb6cfd): the xmem rewrite removed map_whole. 3 of the 5 failing tests no longer exist. CI #385 on this commit is green on Windows, including cargo test --workspace and clippy with -D warnings.
  • The lower.rs policy failure is gone (MAX_FILE_SIZE is now 640 KiB).

So this looks resolved on a-publier, and resolved on main once #14 merges. @⁠BeTiNSz @⁠MamaLeVrai, could you rerun cargo test -p victory-hle --lib on a-publier with build 26300 to confirm?

**@⁠blpeters67** on GitHub · 2026-11-27 00:36 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/8#issuecomment-7206596091) Status check against the current code (no local test run, just the code, history and CI): - main (4f62c2a): still has map_whole, the cause identified above. PR #14 fixes it: reservations under 16 MiB stay off the whole-view path, and zero-length map_alias is a no-op. That covers all five failures, and the PR adds two tests. - a-publier (the default branch, 4eb6cfd): the xmem rewrite removed map_whole. 3 of the 5 failing tests no longer exist. CI #385 on this commit is green on Windows, including `cargo test --workspace` and clippy with -D warnings. - The lower.rs policy failure is gone (MAX_FILE_SIZE is now 640 KiB). So this looks resolved on a-publier, and resolved on main once #14 merges. @⁠BeTiNSz @⁠MamaLeVrai, could you rerun `cargo test -p victory-hle --lib` on a-publier with build 26300 to confirm?
This discussion has been locked. Commenting is limited to contributors.
No description provided.