Skip unresolved None provider hops when tracing packaged forwarders #159

Manually merged
github merged 1 commit from gh-pr/159/head into gh-pr/159/base 2026-11-26 21:31:13 +00:00
Owner

@⁠KomaGuy on GitHub · 2026-11-21 17:47 UTC · original
KomaGuy:fix/forwarded-ambiguous-hop → main · +32 −1 · 2 files · 1 commits · merged 2026-11-21 17:48 UTC

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.
**@⁠KomaGuy** on GitHub · 2026-11-21 17:47 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/159) `KomaGuy:fix/forwarded-ambiguous-hop` → `main` · +32 −1 · 2 files · 1 commits · merged 2026-11-21 17:48 UTC ## 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.
When a unique packaged provider forwards an export to a module basename shared
by multiple packaged DLLs, resolve_desktop records package=True and
provider=None on the terminal step. dependency_paths.trace included that None
provider in forwarded hops, causing TypeError when sorting multiple forwarder
chains on the same edge or KeyError(None) when popping None from the queue.

Filter out steps with no resolved provider while keeping earlier resolved
intermediate packaged hops reachable, and check resolve_desktop + trace on a
multi-hop forwarder ending at an ambiguous package basename.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:31:12 +00:00
github manually merged commit 8ffd0bcaab into gh-pr/159/base 2026-11-26 21:31:13 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.