feat(F-NSWINDOW-E5 r9): IAT name-based autobind + CMPXCHG 0F B0/B1 - #31
Merged
Conversation
…coder+executor + Run E test (1) i386_iat_autobind(): walks IMAGE_IMPORT_DESCRIPTOR → INT → IMAGE_IMPORT_BY_NAME, matches each import name against the shim registry by strcmp — no pre-knowledge of slot VAs needed. Unknown names produce fn=NULL entries (honest; run loop halts UNBOUND_IMPORT with name in last_import). Header: i386_shim_entry_t typedef + decl. (2) pe_parse: adds import_dir_rva/import_dir_size to pe_image_t; reads DataDirectory[1] for both PE32 (opt-header offset 104) and PE32+ (offset 120). (3) CMPXCHG decoder: 0F B0 (cmpxchg r/m8,r8) and 0F B1 (cmpxchg r/m32,r32) added to i386_decode.c (enum ordinals 65/66) and byte-equal i386_decode.hexa mirror (RUNEQ). Executor: compare EAX/AL with r/m; equal → ZF=1, r/m←reg; not-equal → ZF=0, EAX/AL←r/m (Intel SDM Vol.2). Adds rm_set8/mem_write8 helpers. (4) Run E: synthetic in-memory PE import directory (base 0x540000), autobind call, 18-point assertion suite — total=3, bound=3, unbound=0; mini-run through GetCurrentThreadId slot verifies end-to-end dispatch (EAX=0x1A2B, halt=ret); CMPXCHG equal + not-equal path tests. Run A (25 checks) stays green. B/D wall sentinel updated 0F B1 → 0F C1 C0 (XADD, r10 gap). own1: standard PE import resolution = LOADING (not bypass); Intel SDM CMPXCHG; validated_manjeom STAYS 0. r10 target: DX→Metal bridge (lib/loader/dx_d3d11.hexa). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dancinlife
pushed a commit
that referenced
this pull request
Jun 26, 2026
…utobind 3/3+CMPXCHG. E4 거의완성·실 PE 첫 import 너머 실행 배선. 🧱 진짜 벽=DX→Metal 브리지(dx_d3d11.hexa=실 MTL 호출 0건). r10 표적=헤드리스 Metal 오프스크린 readback smoke 먼저 CI 검증(③게이트 실측증명)→이후 D3D11→Metal 배선. validated_manjeom 여전히 0.
dancinlife
added a commit
that referenced
this pull request
Jun 26, 2026
… SSOT (#32) r9(#31) measured 결과를 blocking-frontiers 노드에 update-in-place 박제 — 실 PE IAT name-based autobind(이름으로 import↔shim 바인딩) + CMPXCHG 0F B0/B1. 다음 r10 표적 = DX→Metal 브리지(헤드리스 Metal 오프스크린 readback smoke 먼저 CI 검증). Co-authored-by: dancinlife <mk55911@proton.me> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
F-NSWINDOW-E5 r9 — 실 PE를 첫 import 너머로
핵심: IAT name-based autobind
실 i386 PE의 IAT 슬롯을 합성 VA가 아니라 import 이름으로 native shim에 바인딩 → 실 PE가 자기 import를 해결하고 첫 import 너머로 실행 가능.
pe_parse.{c,h}:import_dir_rva/size(DataDirectory[1], PE32 + PE32+).i386_cpu.c:i386_iat_autobind()— IMAGE_IMPORT_DESCRIPTOR→INT→IMAGE_IMPORT_BY_NAME walk +strcmp매칭. 미매칭 →I386_HALT_UNBOUND_IMPORT+ 이름 기록(정직·silent 아님).i386_shim_entry_t(name+fn+arg_bytes) 레지스트리.디코더: CMPXCHG
0F B0/B1(enum 65/66)C + byte-equal
.hexamirror(RUNEQ) + executor(alu_sub flags · 조건부 write-back 또는 EAX/AL 갱신 · ZF).측정 (Run E 신설)
autobind: total=3 bound=3 unbound=0· mini-runGetCurrentThreadId슬롯 통과(halt=ret, EAX=0x1A2B) · CMPXCHG equal(ZF=1)/not-eq(ZF=0). Run A 25 checks green 유지.__SHIM_TEST__ PASS(-Wall -Wextra -std=c11). B/D 센티넬0F B1→0F C1 C0(XADD = r10 gap).own1
import 이름 바인딩 = 로딩(바이패스 아님) · 합성 PE/CMPXCHG = plain ops · Wine/DRM 0. validated_manjeom 여전히 0(로더 인프라 · 실 프레임은 r10 DX→Metal 브리지).
🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.