net: the log list of blocked destinations grows without bound and is scanned under a global lock #220
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?
Imported from avatarmanz/VIctory-7900XTX. Originally posted by kekonn on 2026-11-26T11:58:04Z.
crates/victory-hle/src/modules/net.rs:71keepsstatic SEEN: Mutex<Vec<(&str, String)>>, so that a blocked destination is logged only the first time. The key includes the port (shown(SocketAddr); WinHTTP logs{name}:{port}, ~738). Every blocked call scans the whole list linearly under one global lock, and nothing ever removes an entry.When: the default path, on every blocked
connect/sendto/name lookup/WinHTTP connect. It grows with each distinct (call, destination:port) pair, which is unbounded only if the title keeps trying new destinations or ports (per-peer UDP, NAT punching, scanning).Proposed fix (~5 lines)
Stop adding after 256 entries and log once that further blocked destinations are not logged. Optionally use a
HashSetfor O(1) lookups.Upstream: no open PR touches
net.rs.Status: a fix is being prepared in kekonn/VIctory-7900XTX on branch
claude/gifted-clarke-uxuqw8.Generated by Claude Code