tooling: add deterministic PE compatibility report #1029
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1036"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-23T22:20:22Z.
Change
Add
tools/compat_report.py, an offline AMD64 PE import-routing report with deterministic JSONand Markdown, plus a synthetic PE test registered in the Linux Python job.
The labels are candidate module routes derived from the import module name:
hle,windows,stuborunsupported. Every row recordsroute_kind: candidate,resolution: not_checkedandprovider: null; a name or ordinal absent from an export tablestill receives its module route and is not claimed to resolve. Stub rows expose
stub: true,provider: null, and the summary reportsstub_providers: 0.The report also records TLS, SEH and load-config directory presence. The 12-byte exception entry
count is limited to AMD64; ARM64 and x86 images are rejected with exit 2 and their machine name.
The image is never loaded or executed.
Verification
out\pe-env\Scripts\python.exe -B tests\compat_report_check.pycompat report synthetic checks passed, exit 0.hle=3,windows=2,stub=2,unsupported=0;by_ordinal=3; stub rows 2, stub providers 0.xmem.dll!#65535still maps tohlewithresolution: not_checked;a fabricated
api-ms-win-fixture-l1-1-0.dll!FabricatedApimaps towindowsfrom theprefix with
resolution: not_checked.no report.
unsupported: negative.exe -> mystery.dll!MissingExport, exit 1, with bothoutputs written for inspection.
out\pe-env\Scripts\python.exe -B tests\docs_links_check.py:Self-test passed.,Checked 13 Markdown files and 223 links., exit 0.git diff --check origin/main...HEAD: clean.Evidence and follow-up
tools/compat-report, heada982c11, based on61e5a09. Two commits:68ec1dbadds the report and synthetic fixture;a982c11addresses the review by namingcandidate routes, flagging the absent stub provider, limiting the SEH count to AMD64 and
registering the check.
src/xmem_shim.cppandsrc/d3d12_xs_shim.cpp; stub entries are public GDK module names without a shim in this tree;Windows entries are explicit system DLLs plus the documented API-set prefixes.
ivall/xcl@38b05b7b6954cfa5bd21cec72f68823603ca2227, publicREADME/issues, observed 2026-11-23 for the reporting categories. Public specification used:
Microsoft PE/COFF and GDK module documentation. Independent implementation:
tools/compat_report.py,tests/compat_report_check.py.provider control; ARM64 and x86 rejection; unknown-DLL negative control.
and load-config flags; reject an output path that equals the input or the other output.
import, TLS, exception and load-config directories from bytes. It remains one behavior.
Checklist
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T22:35:33Z.
Please make the policy labels describe candidate module routes. For example, a name or ordinal absent from the checked-in xmem export table still receives
hle, and a fabricatedapi-ms-win-…name receiveswindowsfrom its prefix. Neither classification establishes that the import resolves. Thestubrows currently have no provider; flag that explicitly in the JSON and summary. Also scope the 12-byte exception-directory count to AMD64: ARM64 and x86 images must be rejected or reported without that count. Add these synthetic controls and register the offline check in the existing Linux Python job.Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-23T22:52:33Z.
Addressed in
a982c11. Route labels are now explicit candidates: every row carries route_kind=candidate, resolution=not_checked and provider=null. An absent xmem ordinal (#65535) and a fabricated api-ms-win name still receive their module route without claiming resolution. Stub rows report stub=true and the summary reports stub_providers=0. ARM64 and x86 images are rejected with exit 2 and their machine name before the 12-byte SEH count, with synthetic controls. The check is registered in the Linux Python job and the AGENTS list. compat_report_check passes; docs_links_check passes with 13 files and 223 links.