PE: add synthetic unit tests for implib.rs and layout.rs #894
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#894
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?
@geiyiliyabumo on GitHub · 2026-11-24 13:37 UTC · original
Summary
Adds 25 deterministic synthetic unit tests for
crates/victory-pe/src/implib.rs(previously 0 tests) andcrates/victory-pe/src/layout.rs(previously 1 test). Production code is unchanged after auditing both files for overflow/bounds/malformed-input handling.Because external PR creation is currently restricted (
collaborators_only), the CI-green branch is ready on my fork for cherry-pick / review:geiyiliyabumo/VIctory@test/pe-implib-and-layoutgeiyiliyabumo/VIctory@131944d(based onmainffe310e)Tests Added (Synthetic Bytes Only)
crates/victory-pe/src/implib.rs(+16 tests): named/ordinal imports, all import kinds,NAME_EXPORTAS, prefix/decoration stripping, dedup vs same-name-different-kind, cross-DLL ordering, empty archive,/&//skipped, non-import member counting, odd-size padding, non-UTF-8 names, and malformed archive/header rejection paths.crates/victory-pe/src/layout.rs(+9 tests): boundary & overflowing reads, hostilee_lfanew, directory indexing at0/15/16/usize::MAX, shortNumberOfRvaAndSizes, missing count field, directory round-trip, and PE32+ layout constants.Verification (Windows 11 x64 MSVC)
rustfmt --edition 2024 --check: PASScargo xtask policy: PASS (154 files ok)cargo clippy -p victory-pe --all-targets --locked -- -D warnings: PASS (0 warnings)cargo test -p victory-pe --locked: 32 passed, 0 failedAI-assisted; synthetic tests only, no game files.