Repository navigation
Conversation
|
Checked on Linux: merged onto main 77fa308 (merges cleanly).
Read the diff as well; it looks right to me. |
LAKSHYA-cmd-tech
left a comment
There was a problem hiding this comment.
Independent Windows CPU verification at 8aeaa5717b3708969d0b2571551299220ab032e7.
Environment & Test Suite
- Platform: Native Windows 11 x64, Python 3.12 / 3.13, CPU-only.
- Clean-room: Pure synthetic test fixtures only, zero game data (
scripts/check_no_game_data.pypasses with exit 0).
Verification
python -I tests/test_d3d12_guid_sites.pyran 10 tests, OK (0.35s).- Verified
test_pe32_separate_lookup_table_handles_four_byte_thunks:Image.iat_slots()intools/d3d12_guid_sites.pynow uses the 4-byte entry width for PE32 when transferring from a separate Import Lookup Table (ILT) to the IAT instead of hardcoding 8-byte strides.- Resolves
KeyError: 8272on PE32 images with non-contiguous/separate ILT/IAT tables.
- Merges cleanly into current
upstream/main(bf85ff703) with zero conflicts. python -I -m compileall tools/d3d12_guid_sites.py tests/test_d3d12_guid_sites.py: clean, exit 0.git diff --check: clean (0).
LGTM. Approved.
|
Tested 8aeaa57 on Windows 11 (CPU only, no GPU needed): pass Windows 11 Pro, Python 3.14.7, no GPU or game files involved; pytest/numpy/Pillow pinned from
AI-assisted (Claude Code, Claude Opus 5.5). |
|
Tested 8aeaa57 on Windows 11 (NTFS), Python 3.12.10 (CPU only, no GPU, no game files): pass What I ran:
Own hand-built images, written with a separate builder (not the test file's
So the PE32+ result does not change, and PE32 now uses the 4-byte stride for both the lookup and IAT addresses. No other line in Overlap: no other open PR changes AI-assisted (Claude Code). |
Claimed in the coordination issue as: GUID-SITES-PE32-IAT-WIDTH (claim).
What and why
Image.iat_slots()already reads PE32 imports with four-byte entries, but copying entries from a separate import lookup table to the IAT used an eight-byte stride for both addresses. A synthetic PE32 image with named/ordinal/named imports therefore raisesKeyError: 8272; running the real scanner exits 1 with a traceback instead of producing its import report.Use the existing
widthfor both addresses. This is one production-line change plus regression tests; it fixes the existing import parser without adding x86 instruction decoding. Microsoft specifies four-byte entries for PE32 and eight-byte entries for PE32+, with matching IAT structure (PE specification).Checked the current #7599 body/comments, preceding #7496, and all-state PR searches for
d3d12_guid_sites,iat_slots, and PE32. No matching claim or fix found. Builds on no other PR.Tested
Windows 11, CPython 3.14.10. CPU only; no GPU/driver, SDK, or game files needed. Base:
f875cda2d785d0c9f50aeec4d09d12c2587edf7d.KeyError, and the CLI exits 1. After:python -I tests/test_d3d12_guid_sites.py -vpasses all 10 tests. Literal expected slot RVAs cover PE32/PE32+, separate/shared tables, and named/ordinal imports; the CLI checks the resulting JSON import report.tests/test_d3d12_iid_scan.py: 13 passed;tests/test_report_paths.py: 22 passed;tests/test_ci_registration.py: 14 tests OK, one skipped.compileallover make_game.py/tools/tests,make_game.py --help, changed-file no-game-data check, andgit diff --check: passed.test_image_atomics_guard,test_image_store_d16). Both failures reproduce on an untouched archive of the base. The newline check also reproduces its existing failure on the base (leonida_tui.py:753,wave_diff.py:373). These are outside this patch; tests: fix image atomics guard and image_store d16 tests after #4473 and #6805 #7608 and tools, workflows: reconfigure stdout error handling and pin text write newlines #7589 address them separately.AI-assisted: yes.
Checklist