D3D12.X: XCL_DRED=1 leaks memory unboundedly and reports Frame 1 pipeline labels because list_x::reset_pc and kickoff_x bypass real::cl_reset #2462
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#2462
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@microwave805 on GitHub · 2026-11-25 19:30 UTC · original
Static audit on
main @ c7e1799found thatXCL_DRED=1(#1592) leaks memory unboundedly and reports stale Frame 1 pipeline labels on every wrapped console command list becauselist_x::reset_pcandlist_x::kickoff_xbypassreal::cl_reset.Where
crates/xcl/src/hle/d3d12x/list_x.rs:3883-3933(reset_pc)crates/xcl/src/hle/d3d12x/list_x.rs:3228-3242(kickoff_x)crates/xcl/src/hle/d3d12x/title_list.rs:154-202, 214-216(reset,reset_139)crates/xcl/src/hle/d3d12x/real.rs:2981-2996(cl_reset)crates/xcl/src/hle/d3d12x/dred.rs:92-101, 123-156(reset,recording_of,bound_after,bound_at)Root cause
dred::resetanddred::mark_pipeline(forinitial_state) are wired intoreal::cl_reset(real.rs:2990-2993) andlist_x::try_split_for_wait(list_x.rs:2701-2704), but every wrapped console command list routes both slot #10Reset(title_list.rs:165) and newer-layout slot #139Reset(title_list.rs:215) throughtitle_list::reset→list_x::reset_pc(andreset_stand_in→list_x::reset_pc), which invokes nativepc(this, PC_RESET)directly (list_x.rs:3891), bypassingreal::cl_reset.list_x::kickoff_x(list_x.rs:3231) likewise callspc(target, PC_RESET)directly.Neither
list_x::reset_pcnorlist_x::kickoff_xcallssuper::dred::resetorsuper::dred::mark_pipeline.Impact
With
XCL_DRED=1on any console title:dred::MARKS[pc]; everySetPipelineState/SetMarkeracross all frames appends forever intoMARKS[pc][0](RECORDINGS = 4eviction atdred.rs:97never runs → unbounded heap growth).recording_of()(dred.rs:123-126) failsr.len() == total(Mmarkers in DRED vsN >> Maccumulated inMARKS[pc][0]), falls back toMARKS[pc][0], andbound_at/bound_afterindex into Frame 1's markers (and missinitial_psoset viaReset/KickoffX).Fix
if hr < 0inlist_x::reset_pc(list_x.rs:3897):if reset_hr < 0inlist_x::kickoff_x(list_x.rs:3237):AI use
main @ c7e1799and issue drafting.github-bot referenced this issue2026-11-26 05:32:30 +00:00
@oni-swr on GitHub · 2026-11-25 20:49 UTC · original
Claiming this issue: wiring dred::reset and dred::mark_pipeline through list_x::reset_pc and list_x::kickoff_x so XCL_DRED=1 does not leak or report stale Frame 1 labels, with regression tests.
AI use: Claude Code (Claude Opus 5.5).