Census: deduplicate PE imports without hint #476
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!476
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/476/head"
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?
@nathanbzrr on GitHub · 2026-11-24 03:50 UTC · original
nathanbzrr:fix/census-dedupe-without-hint→main· +221 −24 · 1 files · 1 commits · merged 2026-11-25 00:08 UTCProblem
victory censusinapps/victory/src/census.rstracked per-DLL unique functions inBTreeSet<ImportSymbol>. BecauseImportSymbolderivesEqandOrdover all fields including the advisory PEhint: u16, identicaldll!functionimports appearing across different binaries (or in both regular and delay-load import tables) with differenthintvalues were counted multiple times infuncs,hle,host, andmissingtotals, disagreeing withmissingentries (which key bye.symbol.to_string()).What changed
FunctionKey { Name(String), Ordinal(u16) }enum implementingFrom<&ImportSymbol>inapps/victory/src/census.rsso PE importhintvalues are ignored when deduplicating per-DLL functions.DllStats.functionsfromBTreeSet<ImportSymbol>toBTreeSet<FunctionKey>.tally_image()fromrun()and insertedFunctionKey::from(&e.symbol)intostats.functions.imports+delay_importsdeduplication across differinghintvalues, ordinal imports, andmissingtotal consistency.Tests (isolated branch
a3f89ed)rustfmt --edition 2024 --check apps/victory/src/census.rs: passed (exit 0).cargo test -p victory --bin victory census: 2 passed, 0 failed, 1 filtered out (census::tests::deduplicates_imports_ignoring_hint_across_images_and_delay_imports,census::tests::counts_distinct_symbols_and_dlls_separately).cargo clippy -p victory --all-targets: passed (exit 0; 0 errors/warnings inapps/victory/src/census.rs).cargo xtask policy:asset policy: 151 files ok.No game files. AI-assisted; reviewed and verified with the tests above.