Skip unresolved None provider hops when tracing packaged forwarders #158

Merged
KomaGuy merged 1 commit from upstream-pr/159 into main 2026-11-21 17:48:51 +00:00
KomaGuy commented 2026-11-21 17:47:03 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KomaGuy on 2026-11-21T17:47:03Z.


Change

Skip unresolved provider=None steps when collecting packaged forwarder hops in tools/dependency_paths.py:

  • When a unique packaged DLL forwards an export to a basename shared by multiple packaged images (ambiguous_package_basename), pe_inventory.resolve_desktop marks the terminal step with package=True and provider=None.
  • dependency_paths.trace previously collected None in hops, raising TypeError when sorting forwarded[(edge, target)] alongside resolved forwarder chains on the same provider or KeyError: None when popping None from the traversal queue (and inserting None into reachable).
  • Filtering s["provider"] keeps resolved intermediate packaged forwarder hops reachable and records the ambiguous_package_basename finding and package_chain without queuing None.

Verification

Tested on Linux x86_64:

  • python3 -B tests/intake/paths_check.py — passed (existing forwarder and FFX route checks plus a resolve_desktop + trace case where a unique packaged provider forwards through an intermediate packaged relay to an ambiguous package basename alongside a valid forwarder on the same DLL).
  • python3 -B tests/script_state_check.py, bcpack_check.py, resource_ranges_check.py, dxcontainer_part_offsets_check.py, layout_chunks_check.py — all passed.
  • python3 -B tests/ffx_dispatch_aot_check.py llvm-mc-19 llvm-objcopy-19 libLLVM-19.so.1 and python3 -B tests/pixel_aot_check.py binary llvm-mc-19 llvm-objcopy-19 libLLVM-19.so.1 — passed.

Evidence and follow-up

  • The new regression in tests/intake/paths_check.py builds its package_resolution chain through pe_inventory.resolve_desktop on synthetic in-memory module tables under the repository's MIT license.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6532313048 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/159). Originally posted by [KomaGuy](https://github.com/KomaGuy) on 2026-11-21T17:47:03Z. --- ## Change Skip unresolved `provider=None` steps when collecting packaged forwarder hops in `tools/dependency_paths.py`: - When a unique packaged DLL forwards an export to a basename shared by multiple packaged images (`ambiguous_package_basename`), `pe_inventory.resolve_desktop` marks the terminal step with `package=True` and `provider=None`. - `dependency_paths.trace` previously collected `None` in `hops`, raising `TypeError` when sorting `forwarded[(edge, target)]` alongside resolved forwarder chains on the same provider or `KeyError: None` when popping `None` from the traversal queue (and inserting `None` into `reachable`). - Filtering `s["provider"]` keeps resolved intermediate packaged forwarder hops reachable and records the `ambiguous_package_basename` finding and `package_chain` without queuing `None`. ## Verification Tested on Linux x86_64: - `python3 -B tests/intake/paths_check.py` — passed (existing forwarder and FFX route checks plus a `resolve_desktop` + `trace` case where a unique packaged provider forwards through an intermediate packaged relay to an ambiguous package basename alongside a valid forwarder on the same DLL). - `python3 -B tests/script_state_check.py`, `bcpack_check.py`, `resource_ranges_check.py`, `dxcontainer_part_offsets_check.py`, `layout_chunks_check.py` — all passed. - `python3 -B tests/ffx_dispatch_aot_check.py llvm-mc-19 llvm-objcopy-19 libLLVM-19.so.1` and `python3 -B tests/pixel_aot_check.py binary llvm-mc-19 llvm-objcopy-19 libLLVM-19.so.1` — passed. ## Evidence and follow-up - The new regression in `tests/intake/paths_check.py` builds its `package_resolution` chain through `pe_inventory.resolve_desktop` on synthetic in-memory module tables under the repository's MIT license.
upstream-sync closed this pull request 2026-11-24 06:41:36 +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!158
No description provided.