pe: reject mixed x86 machine bindings in package preflight #987

Merged
Joacoorandom merged 1 commit from upstream-pr/994 into main 2026-11-23 20:35:16 +00:00
Joacoorandom commented 2026-11-23 20:16:24 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Joacoorandom on 2026-11-23T20:16:24Z.


An AMD64 EXE importing a matching export from a packaged I386 DLL previously received bundled_export_present. Preflight now reports bundled_machine_mismatch, records both machine types and stops that forwarder chain. The package runner rejects the result before mapping or attachment. Direct, delayed and intermediate forwarded imports are covered.

Validation on Linux: python -B tests/pe_package_preflight_check.py (11 passed), python -B tests/pe_package_ordinal_plan_check.py (3 passed), dependency-path/intake-path checks, documentation links and git diff --check. The new regressions fail on the baseline. A source-built Clang/LLD 21.1.8 comparison reports zero failures for AMD64 EXE + AMD64 DLL and one mismatch after replacing only the DLL with its I386 build; the baseline reports zero for both.

The check is limited to I386/AMD64. ARM64EC/ARM64X and other combinations remain explicitly unverified.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6567970731 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/994). Originally posted by [Joacoorandom](https://github.com/Joacoorandom) on 2026-11-23T20:16:24Z. --- An AMD64 EXE importing a matching export from a packaged I386 DLL previously received `bundled_export_present`. Preflight now reports `bundled_machine_mismatch`, records both machine types and stops that forwarder chain. The package runner rejects the result before mapping or attachment. Direct, delayed and intermediate forwarded imports are covered. Validation on Linux: `python -B tests/pe_package_preflight_check.py` (11 passed), `python -B tests/pe_package_ordinal_plan_check.py` (3 passed), dependency-path/intake-path checks, documentation links and `git diff --check`. The new regressions fail on the baseline. A source-built Clang/LLD 21.1.8 comparison reports zero failures for AMD64 EXE + AMD64 DLL and one mismatch after replacing only the DLL with its I386 build; the baseline reports zero for both. The check is limited to I386/AMD64. ARM64EC/ARM64X and other combinations remain explicitly unverified.
upstream-sync closed this pull request 2026-11-24 06:45:45 +00:00
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!987
No description provided.