fix(victory-hle): remove released dstorage File entries from WALLS_FILES #421
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!421
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-421"
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?
@Lewandox on GitHub · 2026-11-26 18:07 UTC · original
Lewandox:fix/dstorage-remove-released-files-from-walls-files→main· +58 −4 · 1 files · 1 commits · openSummary
Fixes a memory leak and stale-address collision in
WALLS_FILESwhen DirectStorage file objects are released (third_party/victory/crates/victory-hle/src/modules/dstorage.rs):WALLS_FILES:open_fileappended(file as usize, path)to the globalWALLS_FILESvector and never removed it when theFileinstance was released. Over a long session this leaked path strings and could return a stale filename if a newFilereused the freed heap address.Dropimplementation onFile(via its storedkey: AtomicUsizeset on creation) that removes its entry fromWALLS_FILESupon release, and deduplicates on insert.releasing_a_file_removes_it_from_walls_filesverifyingWALLS_FILEStracks an opened file and removes it as soon as the finalReleasedrops the instance.Verification
cargo test -p victory-hle --lib modules::dstorage::testscargo xtask policyinsidethird_party/victory23c3b70034to0ef077a7360ef077a736to3e697c29c9View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.