Scripts: preserve aliases in PE export listings #1086

Closed
broccolize wants to merge 1 commit from upstream-pr/1095 into main
broccolize commented 2026-11-24 11:30:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by broccolize on 2026-11-24T11:30:42Z.


A PE export ordinal can have multiple names. The export listing counted each name and kept only the last one for an ordinal. Print every alias on the existing ordinal row.

What is in it

  • Collect each export name per ordinal and list aliases in their original order.
  • Test a synthetic PE with two names for one ordinal and a second ordinal-only export.

Tested

Clean head 03ab1ac72ec2b67f3e63d34178d37745860a62c1. Windows 11 build 26300, Intel Core i5-10300H, NVIDIA GeForce GTX 1650 driver 32.0.16.1714, Rust 1.100.0 MSVC, debug.

  • cargo build --locked --workspace passed.
  • cargo test --locked --workspace -- --test-threads=4 --show-output reported 741 passed, 0 failed, 41 ignored.
  • python -B -m unittest discover -s scripts -p test_pe_exports.py passed.
  • Runtime skips reported by the suite
    • SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64
    • SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64
    • SKIPPED placed_title_textures_share_vram_and_preserve_pixels: this adapter makes no reserved cube with mips
    • mklink /J unavailable – link case skipped
    • SKIPPED test_title_draws_with_a_root_signature_under_the_debug_layer: no d3d12SDKLayers.dll
    • SKIPPED uploads_start_from_each_subresources_state: no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D))

Not tested

Export listings from retail DLLs.

AI use

Codex was used to implement the change and run verifications

<!-- greyfinch-sync:ivall/xcl:issue:6580785118 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1095). Originally posted by [broccolize](https://github.com/broccolize) on 2026-11-24T11:30:42Z. --- A PE export ordinal can have multiple names. The export listing counted each name and kept only the last one for an ordinal. Print every alias on the existing ordinal row. **What is in it** - Collect each export name per ordinal and list aliases in their original order. - Test a synthetic PE with two names for one ordinal and a second ordinal-only export. **Tested** Clean head `03ab1ac72ec2b67f3e63d34178d37745860a62c1`. Windows 11 build 26300, Intel Core i5-10300H, NVIDIA GeForce GTX 1650 driver 32.0.16.1714, Rust 1.100.0 MSVC, debug. - `cargo build --locked --workspace` passed. - `cargo test --locked --workspace -- --test-threads=4 --show-output` reported **741 passed, 0 failed, 41 ignored**. - `python -B -m unittest discover -s scripts -p test_pe_exports.py` passed. - Runtime skips reported by the suite - SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64 - SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64 - SKIPPED placed_title_textures_share_vram_and_preserve_pixels: this adapter makes no reserved cube with mips - mklink /J unavailable – link case skipped - SKIPPED test_title_draws_with_a_root_signature_under_the_debug_layer: no d3d12SDKLayers.dll - SKIPPED uploads_start_from_each_subresources_state: no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)) **Not tested** Export listings from retail DLLs. **AI use** Codex was used to implement the change and run verifications
futurepro62 commented 2026-11-24 15:05:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T14:15:31Z.


Tested exact head 03ab1ac, script tests only, since this PR has no test report yet.

Tested

  • Windows 11 Home 26300, Python 3.14.3 with pytest 9.0.3, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here).
  • python -m pytest scripts/test_pe_exports.py at the head: 1 passed.
  • The PR's test file(s) against current main's script (930e8b4): 1 failed: test_aliases_share_an_ordinal_row. So the new test catches the problem the PR fixes.
  • Same fix as #1084 (opened six minutes earlier, by a different author), which has the same setdefault(...).append change and a 32-bit plus 64-bit test. The two PRs conflict, so only one can land.

Not tested

  • PowerShell 7, the CI workflow itself, a game (no runtime code changed).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7134086018 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1095#issuecomment-7134086018). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T14:15:31Z. --- Tested exact head `03ab1ac`, script tests only, since this PR has no test report yet. **Tested** - Windows 11 Home 26300, Python 3.14.3 with pytest 9.0.3, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here). - `python -m pytest scripts/test_pe_exports.py` at the head: 1 passed. - The PR's test file(s) against current main's script (`930e8b4`): 1 failed: `test_aliases_share_an_ordinal_row`. So the new test catches the problem the PR fixes. - Same fix as #1084 (opened six minutes earlier, by a different author), which has the same `setdefault(...).append` change and a 32-bit plus 64-bit test. The two PRs conflict, so only one can land. **Not tested** - PowerShell 7, the CI workflow itself, a game (no runtime code changed). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
upstream-sync closed this pull request 2026-11-24 19:05:03 +00:00
broccolize commented 2026-11-24 19:07:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by broccolize on 2026-11-24T18:48:45Z.


Closing because #1084 has merged and covers the same behavior. I verified that this PR’s regression test passes on current main.

<!-- greyfinch-sync:ivall/xcl:comment:7141186130 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1095#issuecomment-7141186130). Originally posted by [broccolize](https://github.com/broccolize) on 2026-11-24T18:48:45Z. --- Closing because #1084 has merged and covers the same behavior. I verified that this PR’s regression test passes on current `main`.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1086
No description provided.