Queue: lines are shared and queued fences are held, not addressed #1597
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1597
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@mizzied on GitHub · 2026-11-28 22:11 UTC · original
mizzied:up/queue-lines-fences→main· +288 −73 · 4 files · 1 commits · merged 2026-11-29 08:16 UTCWhat 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.