Watch: what was put in beside a guard goes with the memory (part of #321) #328
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!328
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-328"
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?
@felicerosella on GitHub · 2026-11-26 17:17 UTC · original
felicerosella:fix/beside-forgotten→main· +55 −2 · 1 files · 1 commits · closed without mergingPart of #321: the confirmed
BESIDEleftover described there.put_besidesetsBESIDEat every view of the page, and only an asking (guard()'sBESIDE.take) cleared it. A remap, an unmap or a free of that memory cleared the block's other notes (absent,held,foreign,aliased, the views) but not this bit nor the block'sPUTshare. The next memory at the address took the bit as its own and was told as written before anything wrote to it. In the runtime that costs a spare refresh. In the tests, whose fresh views often land at addresses another test just gave back, it is one of the leftovers behind #321.forget_beside(first, last)clears the bit and thePUTshare of the blocks of a range.title_memory_changed(sotitle_memory_remappedandtitle_memory_unmapping) andtitle_memory_freedcall it, next toforget_views. Both run under the mapping lock thatput_besidetakes withtry_read, so they cannot interleave with a put.Unlike #277's
title_memory_made_anew, this is not test-only and coverstwo_views()/drop_views()too (drop_viewstellstitle_memory_remapped). The two don't conflict.Test:
what_was_put_beside_goes_with_the_memoryputs bytes beside a guard, frees one view (its mark goes, the other's stays), then drops both (no mark left). It doesn't depend on address reuse. Its retry onCannotis bounded at 30 s, as in #315.Results (RTX 4070 SUPER, driver 621.24, Ryzen 7 7800X3D, 64 GB, Windows 11 26200,
mainatc9c932c):cargo clippy -p victory-gpu --all-targets -- -D warnings: clean apart frommain's ownunnecessary_mut_passedintitle_memory_remapped(#324).cargo test -p victory-gpu --lib, parallel, 20 runs each:no_write_is_lost_with_port_75,unchanged_ranges_are_known1,freed_memory_leaves_no_notes1mainno_write_is_lost_with_port_72,unchanged_ranges_are_known1,other_memory_at_a_guarded_address_keeps_its_protection1,records_copied_as_bytes_are_made_at_the_next_sync1So this is a correctness fix for one mechanism. On this machine it doesn't measurably reduce the random failures: the rest of #321 (stale
foreign/PUBLISHED, which #277 covers) is still there. The new test never failed in the parallel runs.no_write_is_lost_with_port_7is a separate cross-test failure, which I'll report on its own.AI-assisted: yes (Claude Code)
@felicerosella on GitHub · 2026-11-26 20:11 UTC · original
Closing in favour of #347, which includes this fix (clearing
BESIDEon remap/unmap/free) along with the rest of #321. Happy to reopen if that one doesn't go in.Pull request closed