cpu: reject four import bindings the call translator should refuse #649
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/655"
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 Leyukaka on 2026-11-22T18:02:15Z.
Change
This closes four coverage gaps in
resolve_import(tools/cpu_call_aot.py). Each was a one-line mutation that let a binding through that the translator should refuse, and everycpu_test still passed onmainwith it applied. Onlytests/cpu/import_check.pychanges (53 added lines); the translator does not.The named-import case now also calls
resolve_importdirectly with the parsed import entry of the built fixture, and expects these rejections:MIX_ARGSfor importmix_argsunbound importunbound importno unique ordinary importlen(matches) != 1relaxed tonot matchesIMAGE_SCN_MEM_EXECUTEnon-executable exportThe unmodified binding is checked first and must resolve to
mix_args, so each rejection is reached with otherwise valid inputs. The modified provider is written to the test's temporary directory.Verification
On
d9c6bf6(branch on2bb9ee0), Windows 11 build 26300.9974, MSVC 14.44.35207, Python 3.14:All 292 tests pass.
Each mutation was applied to
tools/cpu_call_aot.pyone at a time, and allcpu_tests were run. Onmain, all of them passed for each mutation. On this branch, each failscpu_aot_import_call.Checklist
AI-assisted.