Clear stale loose windows when a cell fixture takes its range #346

Manually merged
github merged 1 commit from github-bot/gh-346 into gh-pr/346/base 2026-11-27 19:00:12 +00:00 AGit
Owner

@⁠hamdanpor-ctrl on GitHub · 2026-11-27 18:50 UTC · original
hamdanpor-ctrl:fix/cell-fixture-clears-stale-windows → main · +26 −27 · 1 files · 1 commits · merged 2026-11-27 18:57 UTC

Fixes #341.

CellFixture reserves fresh address space with VirtualAlloc, which can hand back a range another test used and freed. A loose window or exact view that test left in LOOSE or EXACT then answers the fixture's first lookup: loose_allocation_failure_leaves_window_open_to_retry found a window although its allocator always fails.

The fixture now takes every entry overlapping its range out of both tables when it is made, as well as when it is dropped (the drop also covers entries that start before the first cell but reach into it). Tests only.

cargo test -p victory-gpu --locked, parallel Runs loose_allocation_failure_leaves_window_open_to_retry failed
main at 151b7db 20 1
this branch on 104c3d3 40 0

The failure was rare, so 0 of 40 is limited evidence; I have not found which test leaves the entry. Clippy with and without --all-features is clean, and shadow::loose_allocation_tests:: passes with --all-features --test-threads=1.

In the 40 runs two other tests failed once each, both outside this fixture and both already holding one_asking_test(): host::refresh_tests::raw_title_copy_keeps_write_watch_and_resends_equal_bytes (host.rs:12535, unwrap on None) and watch::tests::a_raw_copy_in_watched_memory_keeps_the_other_asked_ranges (watch.rs:4559, "watched destination"). I'll look at those separately.

RTX 3050 Laptop GPU 4 GB (driver 617.42), i7-12700H, 16 GB, Windows 11 Pro, Rust 1.98.1.

AI-assisted (Claude Code).

🤖 Generated with Claude Code

**@⁠hamdanpor-ctrl** on GitHub · 2026-11-27 18:50 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/346) `hamdanpor-ctrl:fix/cell-fixture-clears-stale-windows` → `main` · +26 −27 · 1 files · 1 commits · merged 2026-11-27 18:57 UTC Fixes #341. `CellFixture` reserves fresh address space with `VirtualAlloc`, which can hand back a range another test used and freed. A loose window or exact view that test left in `LOOSE` or `EXACT` then answers the fixture's first lookup: `loose_allocation_failure_leaves_window_open_to_retry` found a window although its allocator always fails. The fixture now takes every entry overlapping its range out of both tables when it is made, as well as when it is dropped (the drop also covers entries that start before the first cell but reach into it). Tests only. | `cargo test -p victory-gpu --locked`, parallel | Runs | `loose_allocation_failure_leaves_window_open_to_retry` failed | |---|---:|---:| | `main` at `151b7db` | 20 | 1 | | this branch on `104c3d3` | 40 | 0 | The failure was rare, so 0 of 40 is limited evidence; I have not found which test leaves the entry. Clippy with and without `--all-features` is clean, and `shadow::loose_allocation_tests::` passes with `--all-features --test-threads=1`. In the 40 runs two other tests failed once each, both outside this fixture and both already holding `one_asking_test()`: `host::refresh_tests::raw_title_copy_keeps_write_watch_and_resends_equal_bytes` (`host.rs:12535`, unwrap on `None`) and `watch::tests::a_raw_copy_in_watched_memory_keeps_the_other_asked_ranges` (`watch.rs:4559`, "watched destination"). I'll look at those separately. RTX 3050 Laptop GPU 4 GB (driver 617.42), i7-12700H, 16 GB, Windows 11 Pro, Rust 1.98.1. AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A CellFixture reserves fresh address space with VirtualAlloc, which can
hand back a range another test used and freed. A loose window or exact
view that test left in LOOSE or EXACT then answers the fixture's first
lookup, as in #341: loose_allocation_failure_leaves_window_open_to_retry
found a window although its allocator always fails.

The fixture now takes out every entry overlapping its range when it is
made, as well as when it is dropped; the drop also covers entries that
start before the first cell but reach into it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 18:53:25 +00:00
github-bot changed target branch from main to gh-pr/346/base 2026-11-27 19:00:10 +00:00
github manually merged commit d06c26033c into gh-pr/346/base 2026-11-27 19:00:12 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.