Renderer port 2: a marked heap that goes takes its fallback pages with it (stale pages became inverted ranges) #273
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!273
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-273"
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?
@sharan104 on GitHub · 2026-11-26 14:03 UTC · original
sharan104:fix/root-audit→main· +35 −0 · 1 files · 1 commits · openWith
VICTORY_PORT_DESCRIPTORS=1(renderer port 2, off by default; reporters use it, e.g. #240),port_descriptors::let_godropped the marked view heap but left the fallback's page set full. These are the write-watch pagesasked()gathered for the old heap. When the next shader-visible view heap is adopted,to_checkkeeps handing out the old heap's pages.sync_heaps(descriptor.rs) clamps each one to the new heap, so a page outside it becomes a range that ends before it begins:changed_slotsunderflows and panics.VICTORY_SYNC_IN_PLACE=0:page_bytes.resize(to - from)asks for nearlyusize::MAXbytes, which panics in release too.Whether the title ever drops and recreates that heap is unknown without the game. When it does, these are the outcomes.
Fix:
let_goalso clears the fallback's pages and resets where it resumes (next). It takesFALLBACKwhile holding theADOPTEDwrite lock. No path takes them in the other order:ask_due,askedandto_checknever touchADOPTED.Test:
a_heap_that_goes_leaves_no_pages_to_checkadopts a heap, reports two of its pages, lets it go and adopts another. Before the fix,to_checkreturned the old heap's two pages. Now it returns none, and a page of the new heap still comes back. A small test lock (one_heap) makes the two heap tests take turns, since the marked heap is one per process. The new test fails before the fix and passed 10 runs out of 10 after it.Results:
cargo test -p victory-gpu --locked: 382 passed, 0 failed, 34 ignored.-D warnings, with and without--all-features, is clean apart from main's existingunnecessary_mut_passedinwatch.rs, which #241 fixes.🤖 Generated with Claude Code
@lerapeurdu62280-debug on GitHub · 2026-11-26 14:16 UTC · original · approved these changes
Read the diff. Clearing the fallback's pages and next in let_go fixes the stale-page inverted ranges, the FALLBACK-under-ADOPTED lock order holds (ask_due/asked/to_check never take ADOPTED), and the new test fails without the fix.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.