Tidy-ups in diagnostics, switch-only and offline code: leaked handles, unbounded lists, ignored errors #227
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#227
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?
@kekonn on GitHub · 2026-11-26 12:03 UTC · original
These are verified, small, and off the default runtime path. They're follow-ups; anyone may pick one up.
crates/victory-gpu/src/replay/gpu.rs:Workercreates an event (CreateEventW, ~34) and has noDrop.play.rs~1460 makes one per 256 MiB upload batch, so one event leaks per batch (diagnostics builds). Fix:impl Drop for Workerthat closes the event, likeRigininplace.rs~676.crates/victory-gpu/src/timeline/record.rsput_of(~119) never checkson(). Waits or spans that straddleend()write into the next recording's slots 0 and on (VICTORY_TIMELINE). Fix:if !on() { return; }(optionally instack()too).crates/victory-loader/src/profile.rs: thread handles are closed only insidewrite(), afterFile::createsucceeds (~150-161), so a bad path leaks them (VICTORY_PROFILE). Fix:impl Drop for Thread.apps/victory/src/run.rs~285:rva + 4 <= sizeoverflows for a huge value. Fix:rva.checked_add(4).is_some_and(|e| e <= size), as at ~266.crates/victory-shader/src/emit/validator.rs: theGetStatusHRESULT is ignored (~190), so a failed call counts as validated;from_raw_parts(null, 0)is possible (~199). Fix: check the HRESULT, and use an empty slice when the pointer is null.crates/victory-shader/src/emit/bitcode/census.rs: the thread-localWRITTENlist (~51/85) is emptied only bytranslate.rs. It grows in game runs withVICTORY_SHADER_CENSUS, and when the census file cannot be opened. Fix: cap it (for example the last 64), and calltakebefore the early return incensus_line.crates/victory-gpu/src/texstore.rs~183: the channel of full texture copies is unbounded (VICTORY_TEXTURE_STORE). Fix:sync_channel(8)+try_send.host/upcheck.rs~283-295:KNOWNgrows per copy (VICTORY_UPCOPY_CHECK); keep only the ids still incarded_copies(). Leavetexture/ahead.rs's error path alone for now: #72 edits the same function.crates/victory-gpu/src/pipeline/known.rsmake()skips a missing entry silently (~289), which can makevictory warmblame the wrong pipeline (warm.rs~141-145, ~206-212). It's practically unreachable with an append-only file. Fix inknown.rs, not inwarm.rs, because #186 rewrites that loop.