Queue: lines are shared and queued fences are held, not addressed #1597
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1597"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by mizzied on 2026-11-28T22:11:00Z.
What was wrong. Two use-after-free paths in the queue code:
release_helddereferenced the address of a queue the title may already have released.The fix.
Arc<QueueLine>with a retired flag. It's registered inWAITINGwith its address (for diagnostics only), and the queue's drop retires it and takes it off the list, sorelease_heldreads a line it holds a reference to.FenceRef, a reference to the fence, instead of its address. This coversqueue::Held, the line'sJob::Wait,Job::Signaland joined signals, andhost::Late::Signal, so a fence the title released isn't read after it's freed.How it was tested. RTX 5070, Windows 11. New tests check two things:
cargo test --workspacepasses apart fromrepository_passes_policy, which already fails onmain:lower.rsis over the 640 KiB file-size limit there (#1493 raises it). Clippy reports only the 16 findings already onmain, none on lines this PR changes.