Forget the views a test unmaps in drop_views #382
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/TaynanGT--Vice-Tay!382
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@hamdanpor-ctrl on GitHub · 2026-11-27 21:36 UTC · original
hamdanpor-ctrl:fix/drop-views-forgets-views→main· +3 −1 · 1 files · 1 commits · openAddresses #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
@hamdanpor-ctrl on GitHub · 2026-11-27 21:57 UTC · original
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).
@hamdanpor-ctrl on GitHub · 2026-11-27 21:58 UTC · original
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).
@akimfomin on GitHub · 2026-11-28 00:38 UTC · original
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.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.