Forget the views a test unmaps in drop_views #382
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/382"
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?
Imported from TaynanGT/Vice-Tay. Originally posted by hamdanpor-ctrl on 2026-11-27T21:36:41Z.
Addresses #354.
drop_viewstold the guard of each view withtitle_memory_remappedand then unmapped it, soVIEWSkept those blocks as views. A later test that got the same addresses fromVirtualAllocfor private, write-watched memory then had its range refused byask_once(refused_as_view), nothing was kept, andasked()/prepare_raw_copy_note()answeredNone.drop_viewsnow callstitle_memory_unmappingbefore unmapping, as the runtime and the other unmapping tests do, which forgets the views. One line, tests only.How it was found: with a temporary
eprintln!inask_rest(not in this PR), every one of 8 failures of the two raw-copy tests on1d83085showed the test's fresh allocation skipped withpublished=false view=true.cargo test -p victory-gpu --locked, parallel1d830851d83085+ this changeraw_title_copy_keeps_write_watch_and_resends_equal_bytes)mainat2d970730148258So most of it is this; the one remaining failure on
1d83085suggests a second, rarer source I have not found. Clippy with and without--all-featuresis clean, andcargo test -p victory-gpu --all-features --locked -- --test-threads=1passes.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
Imported from TaynanGT/Vice-Tay. Originally posted by hamdanpor-ctrl on 2026-11-27T21:57:44Z.
More runs on
1d83085with this change applied (cargo test -p victory-gpu --locked, parallel): 2 failures in 50 runs in total (1 of 10, 1 of 20, 0 of 20), against 30 of 50 without it.The one leftover failure I could catch was
raw_title_copy_keeps_write_watch_and_resends_equal_byteswith its range skipped as a view as well (VIEWSset,PROTECTEDnot), so some other path still leaves aVIEWSbit on freed memory, much more rarely. A probe recording which thread setsVIEWSinguard()changed the timing enough that it did not fail in 20 runs, so I don't have its source yet.AI-assisted (Claude Code).
Imported from TaynanGT/Vice-Tay. Originally posted by hamdanpor-ctrl on 2026-11-27T21:58:32Z.
The failing default-tests job is
host::refresh_tests::unchanged_ranges_are_known(host.rs:13136, "view false: written at its end"). It holdsone_asking_test(), and itsview = falsehalf uses fresh private write-watched memory fromtitle(8 * PAGE, false), the same situation as the two raw-copy tests, so it looks like the rarer leftover I mentioned above (aVIEWSbit still set on a reused address) rather than something this change adds. This branch passed it in all 40 parallel runs ofcargo test -p victory-gpu --lockedhere, and the diagnostics job passed. Could you re-run the failed jobs?AI-assisted (Claude Code).
Imported from TaynanGT/Vice-Tay. Originally posted by akimfomin on 2026-11-28T00:38:18Z.
PortBridge checked
ea55797on current mainfe7c6e5and with #379. Both Git comparisons are clean. The remaining 2/50 raw-copy failures are a separate test question.A deterministic control would reserve a test-owned address, register and release a view at that address, then reserve the same address as private write-watched memory before calling
ask_once. An unmapping hook omitted by mutation should leaveview=trueand the test should fail. Keep a distinct active-alias case where the address is still a view and must stay refused. That distinguishes a staleVIEWSentry from an overly broad clear without another 50 scheduling-dependent runs. The victory-fork #1496 placed-page fixture is a complementary control for preserving a genuine later write, not the same bug. PortBridge evidence.Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-29T11:37:40Z.
Thanks for the clean merge comparison and proposed deterministic fixture. The stale view and genuinely active alias need opposite expected outcomes. Please keep the mutation control and use a test-owned address, so the remaining parallel failures are investigated without depending only on scheduling.
Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-30T17:10:35Z.
mainhas moved to a new line of the code and everything is now named Vice-Tay, so this PR no longer applies as it is (details in #468). If you'd like this change in, please rebuild it on the currentmainand open a new PR; I'll review it there.Pull request closed