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

Merged
hamdanpor-ctrl merged 1 commit from upstream-pr/346 into main 2026-11-27 18:57:32 +00:00
hamdanpor-ctrl commented 2026-11-27 18:50:48 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by hamdanpor-ctrl on 2026-11-27T18:50:48Z.


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

<!-- greyfinch-sync:TaynanGT/Vice-Tay:issue:5531630697 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/346). Originally posted by [hamdanpor-ctrl](https://github.com/hamdanpor-ctrl) on 2026-11-27T18:50:48Z. --- 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)
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
TaynanGT/Vice-Tay!346
No description provided.