Tests: a page's failed move goes to an address Windows never hands out #2773
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2773
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2773"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@inf1425 on GitHub · 2026-11-26 11:38 UTC · original
inf1425:tests/kernelx-move-fails-unreservable-address→nvidia-dev· +6 −3 · 1 files · 1 commits · drafta_page_whose_move_fails_stays_mapped_where_it_wasgets "an address with nothing reserved" for its move by reserving a page and releasing it again. With tests running on other threads, Windows can give that address to one of them before the move. The commit then succeeds and the test fails atmove_away(..).is_err(). Worse, the move writes this test's page into the other test's reservation. In one parallel run,a_page_leaving_plain_memory_has_the_tiles_over_it_linked_againread7, this test's value, where it had written0xA. The destination is now the first page past the user address space. Committing there always fails, and Windows never gives that address to anyone. Found while checking thenvidia-devtest failures reported in #42.What is in it
crates/xcl/src/hle/kernelx.rs(inmod tests): the destination isGetSystemInfo'slpMaximumApplicationAddress + 1, rounded up to 64 KiB. Test code only;windows-sysalready has theWin32_System_SystemInformationfeature.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4at this PR's head: 1745 passed, 5 failed, 48 ignored. The 5 failures are the ones reported in #42: four are fixed by #2770 and #2771, and the mesh test is in #2632.XCL_HEAP_WINDOWS=1.cargo test -p xcl --lib hle::kernelx -- --test-threads=4, repeated:an_address_keeps_the_page_the_title_mapped_there_last); that is the release race #2772 fixes;Regression run
#[cfg(test)] mod testsand never reachesxcl.exe, butscripts/pr_check.pycounts any file undercrates/xcl/src/as runtime. Smoke blocks fromnvidia-devand from this head will be added once a title is available, unless a maintainer prefers thetest-onlylabel.main:
PR:
Not tested
AI use
@Prime1997 on GitHub · 2026-11-26 12:46 UTC · original · reviewed
Good within this test-only fix. The failed-move fixture now uses an address Windows cannot hand out, while preserving the assertion that the original page remains mapped. This avoids relying on another thread not reclaiming a released reservation.
Tested clean PR head
0c0a7aa4ef1c0ced8436ebfd9fdaf1c4182baf98, targeting currentnvidia-devaf2cecc40886a8682ecf3267f5328c6dc4b66ad7, in its own worktree and build directory. 1 passed, 0 failed, 0 ignored, 0 skipped. Each filter ran in a fresh process:hle::kernelx::tests::a_page_whose_move_fails_stays_mapped_where_it_wasBuild:
cargo test --locked --offline -p xcl --lib --no-run --message-format=json --target-dir <isolated-target>. Execution:<test-exe> <each-exact-name-above> --exact --test-threads=1 --nocapture. Only private executable/target paths are placeholders. Windows 11 Pro 26200, i5-10400, 32 GiB RAM, Rust 1.100.0 MSVC debug tests; no GPU calls in these selected fixtures.Not tested: This is one owned-memory Windows fixture, not a concurrent stress run or proof of unrelated page-mapping paths. This supports retaining the PR; it is not whole-branch or merge certification.
AI use: Codex (GPT-6) reviewed source, ran the exact tests and checked the raw results. Optional temporary Discord for coordinating contributor work, testing and comparing results.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.