dstorage: WALLS_FILES grows on every OpenFile without VICTORY_WALLS_TRACE; a null out-pointer leaks the file handle or queue lane #217
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#217
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 11:56 UTC · original
crates/victory-hle/src/modules/dstorage.rsWALLS_FILES.lock()…push((file as usize, kept))runs on everyIDStorageFactory::OpenFile, whether or notVICTORY_WALLS_TRACEis set. Its only reader,walls_request(~667-678), returns early when tracing is off. Nothing removes an entry when the file is released. The list therefore gains about 100 bytes per open for the whole run.open_file(~151-158) creates the host file handle, andcreate_queue(~218-223) inserts a lane, beforeput()rejects a nullout. Both then leak, because the object'sDropnever runs.When: the growth happens on the default path, one entry per file open. The wrong names appear only with
VICTORY_WALLS_TRACE. The leaks need a title that passes a nullout.Proposed fix (~6 lines)
if walls_trace() != 0 { … }.files.iter().rev().find(…)so the newest entry for an address wins.E_INVALIDARGon a nulloutbefore creating the file handle or the lane.Upstream: no open PR touches
dstorage.rs.Status: a fix is being prepared in kekonn/VIctory-7900XTX on branch
claude/gifted-clarke-uxuqw8.Generated by Claude Code