CLI: resolve same-directory title DLL exports in census #2039
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!2039
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2039"
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?
@fuzeofficlal on GitHub · 2026-11-25 03:52 UTC · original
fuzeofficlal:fix/cli-census-title-dll-exports-838→main· +601 −41 · 1 files · 1 commits · openSummary
victory census, indexing exports of scanned DLLs by canonical parent directory and ASCII-lowercased filename.titlecolumn instead of reporting them as unresolvedmissinghost/HLE gaps, while preserving cross-directory scan-order independence and existingFunctionKey/ canonical-path deduplication.Fixes #838
Testing
cargo test -p victory --lockedcargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo xtask policy@jeremygold02 on GitHub · 2026-11-25 04:08 UTC · original
Triage verdict — Keep for #838, distinguish forwarder declarations from resolved imports (
0c8615f)Evidence
FooFwd -> other.Target, supplies no target DLL, and expects three title resolutions and zero missing. Export index · Forwarder fixtureGetProcAddressand only reports a title import when it obtains an address. A forwarder declaration alone does not establish that its target is reachable. Runtime resolver · Export lookup · PE forwarder formatChecks and limits
Next step
This verification was AI-assisted.
@fuzeofficlal on GitHub · 2026-11-25 04:44 UTC · original
Updated in
6f8735f9— good catch @jeremygold02.TitleExportsnow distinguishes direct RVA exports from forwarder strings and verifies each forwarder target againstHleResolver(HLE /HostPolicy) or same-directory title DLL exports, guarded by a visited set andMAX_FORWARD_HOPS = 16bound for cycles. Updated the forwarder fixture to chain through real same-directory and HLE targets, and addeddangling_and_cyclic_forwarders_stay_missingcovering missing target DLLs, missing target symbols/ordinals, mutual cycles, and self-loops.@Marvisak on GitHub · 2026-11-25 09:20 UTC · original · edited 2026-11-26 00:26 UTC
Automated triage for the maintainers.
Merge candidate.
apps/victory/src/census.rs:collectparses every image first and indexes the direct exports of scanned DLLs by canonical directory and lowercase file name;tally_imagethen counts an import that neither HLE nor the host policy covers astitlewhen a same-directory DLL thattitle_dllallows exports it, replacing the oldunreachable!("census maps no title DLLs")arm. As asked in the second look, the forwarder chain is gone:TitleExports::insert_allskips exports with no RVA, so forwarded exports stay missing, andExportTarget,parse_forwarder,MAX_FORWARD_HOPSand the forwarder tests are removed. The branch is one commit onf3578e3, after #1863, and keeps its scan-loop changes; tests use synthetic PE data written to a temp directory only.CI: passing (
check).On your reply: checked, the simplification matches what was asked.
Recommending a look, not approving.
Generated by Claude Code
@Marvisak on GitHub · 2026-11-25 22:02 UTC · original
Automated triage for the maintainers, second look (a review against
main, with the PR built and tested).The title column is right, and this can be merged once it is simplified and rebased. Please drop the forwarder chain: no title DLL forwards an export, and the chain counts HLE targets that the Windows loader would not use. In
apps/victory/src/census.rsTitleExports::insert_all, index only exports withe.rva.is_some(), so that a forwarded export stays missing, and deleteExportTarget,parse_forwarder,MAX_FORWARD_HOPSandresolves_title_export_inner(a plaintitle_dll(..)check plus an export lookup is enough), thedangling_and_cyclic_forwarders_stay_missingtest, the Forward cases ofresolves_same_dir_title_dll_exports_by_name_ordinal_and_forward, andExportSpec::Forwardin the PE builder. Then rebase ontomain: #1863, merged today, changed the same scan loop.Push the change and it will be reviewed again. Thank you for the contribution.
@fuzeofficlal on GitHub · 2026-11-25 22:30 UTC · original
Simplified and rebased onto
main(f3578e3) inf12f217per second-look feedback:ExportTarget,parse_forwarder,MAX_FORWARD_HOPS,resolves_title_export_inner).TitleExports::insert_allnow indexes only direct exports (e.rva.is_some()), so forwarded exports remain missing, andresolves_title_exportis a plaintitle_dll(&resolver.host, dll_key)check plus set lookup.dangling_and_cyclic_forwarders_stay_missing, theForwardcases in the resolution test, andExportSpec::Forwardfrom the synthetic PE builder.cargo test -p victory census(9/9 passed),cargo clippy -p victory --all-targets -- -D warnings, andcargo xtask policy(190 files ok).View 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.