pe: cover mixed-case forwarder targets #510

Merged
VoidxNullx merged 2 commits from upstream-pr/516 into main 2026-11-22 09:43:15 +00:00
VoidxNullx commented 2026-11-22 08:46:18 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by VoidxNullx on 2026-11-22T08:46:18Z.


Adds a seventh forwarder, forwarded_upper, to bundled_export_forwarders. Its target module is written in uppercase (INTAKE_PROVIDER.named_value). The test expects it to resolve to the same intake_provider.dll hop as the lowercase forwarders. Windows treats DLL names as case-insensitive, and no existing forwarder target used uppercase.

The scanner already handled this case, so this PR adds test coverage and changes no scanner code. The first commit changes forward.def, forward_caller.cpp and forwarders_check.py. The second updates the matching paragraph in docs/experiments.md.

Test command and result (Windows 11, VS 2026 Build Tools, Python venv from requirements-dev.txt):

ctest --preset dev --no-tests=error -R 'static_exe_intake|conditional_import_paths|bundled_export_forwarders'
100% tests passed, 0 tests failed out of 3

The full suite also passed: 217 tests, 0 failures, 3 capability skips (bvh_wave64_hardware, bvh_wave64_warp, wave_shuffle_warp).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6540429013 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/516). Originally posted by [VoidxNullx](https://github.com/VoidxNullx) on 2026-11-22T08:46:18Z. --- Adds a seventh forwarder, `forwarded_upper`, to `bundled_export_forwarders`. Its target module is written in uppercase (`INTAKE_PROVIDER.named_value`). The test expects it to resolve to the same `intake_provider.dll` hop as the lowercase forwarders. Windows treats DLL names as case-insensitive, and no existing forwarder target used uppercase. The scanner already handled this case, so this PR adds test coverage and changes no scanner code. The first commit changes `forward.def`, `forward_caller.cpp` and `forwarders_check.py`. The second updates the matching paragraph in `docs/experiments.md`. Test command and result (Windows 11, VS 2026 Build Tools, Python venv from requirements-dev.txt): ctest --preset dev --no-tests=error -R 'static_exe_intake|conditional_import_paths|bundled_export_forwarders' 100% tests passed, 0 tests failed out of 3 The full suite also passed: 217 tests, 0 failures, 3 capability skips (`bvh_wave64_hardware`, `bvh_wave64_warp`, `wave_shuffle_warp`).
upstream-sync closed this pull request 2026-11-24 06:43:27 +00:00
VoidxNullx commented 2026-11-24 06:48:29 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by VoidxNullx on 2026-11-22T08:58:53Z.


Mutation check: removing the .lower() on the forwarder target module in tools/pe_inventory.py (the module.lower() + ".dll" expression) makes bundled_export_forwarders fail at the new forwarded_upper assert in forwarders_check.py. Restoring the line makes it pass again. So the new case guards the case-insensitive module match, and the mutation was not committed.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7076854226 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/516#issuecomment-7076854226). Originally posted by [VoidxNullx](https://github.com/VoidxNullx) on 2026-11-22T08:58:53Z. --- Mutation check: removing the `.lower()` on the forwarder target module in `tools/pe_inventory.py` (the `module.lower() + ".dll"` expression) makes `bundled_export_forwarders` fail at the new `forwarded_upper` assert in `forwarders_check.py`. Restoring the line makes it pass again. So the new case guards the case-insensitive module match, and the mutation was not committed.
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
R0Y00/Xbox2Windows!510
No description provided.