Repository navigation
Analysis-tier: AArch64 PLT import-name e2e (linked fixture) - #14
Merged
Merged
Conversation
Prove the elf_plt AArch64 path (s1_loader/elf_plt.rs::decode_aarch64) resolves
imports end-to-end on a real, linked, dynamic AArch64 executable. The decoder was
previously only unit-tested against synthetic veneer bytes — the x86 paths had a
real-binary console gate (verify_w11_elf_plt_names) but AArch64 had no linked
fixture. A dev container with the AArch64 toolchain + linker makes the linked
build possible in-env.
- New fixture decompiler/crates/kuna-analysis/tests/fixtures/plt_aarch64
(9056 bytes, ET_EXEC, Machine AArch64, dynamic; .plt + .rela.plt + DT_PLTGOT),
built aarch64-linux-gnu-gcc -O0 -no-pie from plt_aarch64.c (main calls
puts("hello") then printf("%d\n", argc)). Standard GNU ld 16-byte veneer
(adrp x16; ldr x17,[x16,#lo12]; add x16; br x17). main=0x400604,
puts@plt=0x4004d0 (GOT 0x411018), printf@plt=0x4004e0 (GOT 0x411020).
- New e2e decompiler/crates/kuna-console/tests/verify_aarch64_plt.rs, modeled on
the x86 gate: bootstrap_from_elf -> load function main -> decompile -> print C;
asserts puts(/printf( render and the sub_4004d0/sub_4004e0 placeholders are
gone. Same specs-absent skip guard (needs AARCH64.sla). Actually decodes
(does not skip).
No elf_plt.rs fix needed — decode_aarch64 already handled this binary's veneer
layout. Purely additive (fixture + e2e + README provenance + Increment 19 log).
Gates: make test 675/675 PARITY OK; make test-stages 158/158 PARITY OK;
make rust-test green (verify_aarch64_plt 1 passed). Additive real-ELF-path
change -> XML datatest/stage gates structurally untouched.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FvRnfTgYKoZvS2TEvdYpWb
This was referenced Jun 26, 2026
This was referenced Sep 18, 2026
Merged
mahaloz
added a commit
that referenced
this pull request
Sep 27, 2026
…ages baseline +20 elemptr keys only (1430) tiedphitrim #13/#14 and structsynth-locals #2 read a 4-byte field through an inferred int8 * and pinned upstream's widened form (int4)v[1]; with elemptr on the load stays 4 bytes, *(int4 *)&v[1]. Keys unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01V6bguCkPS65cu9ejj1fbpy
mahaloz
added a commit
that referenced
this pull request
Sep 29, 2026
… ^ ~ << to a sign-sensitive reader A value that reaches a shift, divide, compare, widening or int-to-float through an expression C types after it (usink + 1 >> 4) was still merged into the global. Both walks now follow such expressions; P6 stops at an explicit output (its own declared variable). New witnesses w_sadd, w_xordiv, w_f, w_sidx, w_cond; stage assertions #11-#14. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01JiRmwW65ibgRi4sd1CkDiE
mahaloz
added a commit
that referenced
this pull request
Sep 29, 2026
… (1488 -> 1502 on main 1f01d62) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01JiRmwW65ibgRi4sd1CkDiE
mahaloz
added a commit
that referenced
this pull request
Sep 29, 2026
…ot that reads it ActionConditionalConst gives a RETURN a known constant through a COPY and, like upstream, stored that COPY in the RETURN's slot 1. Slot 1 is the return value only once return recovery has trimmed the RETURN; while the output trials are still open the RETURN reads every trial register (rax in slot 1, rdx in slot 2 on x86-64), and a constant known for rdx replaced the rax slot. With condexeret holding recovery open one more iteration, a function whose second RETURN is reached only when rdx == 0 printed `return 0;` there instead of the entry value (reviewer's tworet7). The COPY now goes to the slot that actually reads the varnode, which is slot 1 on a trimmed RETURN, as upstream. Not behind an option: it only corrects a RETURN whose recovery outlives the first mainloop iteration. With condexeret off, decompile-all over 5,422 fixture and 36,464 decbench functions is byte-identical to the unpatched build. tworet, tworet1 (the one-branch reference) and tworet7 join tests/stages/kuna-condexeret.xml; the pre-fix build fails #4 and #14 there. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TzSHsg8KAakpogyVw5dtjG
mahaloz
added a commit
that referenced
this pull request
Oct 1, 2026
…n earlier value At -O0 a pointer stored to a global in both arms of a branch let RulePushMulti replace the global's MULTIEQUAL with the frame variable's join, so the load after `*pp = p` read the frame variable; RulePushMulti now leaves a global's join whose input is a kept store. A load after a pointer store also stays on the global when an earlier value of the global is read after the store through a register; only a heritage gap still keeps upstream's handling. The fixture gains g_old and g_branch; stage assertions #14 and #15. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Ps66ZCFPLywq9AKHBuDXNU
mahaloz
added a commit
that referenced
this pull request
Oct 1, 2026
…n earlier value At -O0 a pointer stored to a global in both arms of a branch let RulePushMulti replace the global's MULTIEQUAL with the frame variable's join, so the load after `*pp = p` read the frame variable; RulePushMulti now leaves a global's join whose input is a kept store. A load after a pointer store also stays on the global when an earlier value of the global is read after the store through a register; only a heritage gap still keeps upstream's handling. The fixture gains g_old and g_branch; stage assertions #14 and #15. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Ps66ZCFPLywq9AKHBuDXNU
mahaloz
added a commit
that referenced
this pull request
Oct 1, 2026
…n earlier value At -O0 a pointer stored to a global in both arms of a branch let RulePushMulti replace the global's MULTIEQUAL with the frame variable's join, so the load after `*pp = p` read the frame variable; RulePushMulti now leaves a global's join whose input is a kept store. A load after a pointer store also stays on the global when an earlier value of the global is read after the store through a register; only a heritage gap still keeps upstream's handling. The fixture gains g_old and g_branch; stage assertions #14 and #15. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Ps66ZCFPLywq9AKHBuDXNU
mahaloz
added a commit
that referenced
this pull request
Oct 7, 2026
…rption reaches past the slots taken Clearing COPY_CONSTANT on every slot extend_unbounded takes also cut upstream's own constant absorption short: `long a[6]` with a[0]..a[4] constant and a[5] = x read on its own lost a[5] (`long v1[5]` plus a scalar, the loop index printed past the array) where `off` prints [6]. Clear the mark only on the last slot taken, and only when upstream's absorption would not reach past it without the option (some slot from the array's last element through the last slot taken holds no constant store it accepts). The -O0 cases (flag, counters, read unsigned) are unchanged; where the chain is live the array is upstream's. Stage test #14 (s6, gcc -O0) keeps [6] in every pass; baseline re-recorded (14 new keys, none missing). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019c7W9nMmArWipVaBuMCy39
mahaloz
added a commit
that referenced
this pull request
Oct 7, 2026
…rption reaches past the slots taken Clearing COPY_CONSTANT on every slot extend_unbounded takes also cut upstream's own constant absorption short: `long a[6]` with a[0]..a[4] constant and a[5] = x read on its own lost a[5] (`long v1[5]` plus a scalar, the loop index printed past the array) where `off` prints [6]. Clear the mark only on the last slot taken, and only when upstream's absorption would not reach past it without the option (some slot from the array's last element through the last slot taken holds no constant store it accepts). The -O0 cases (flag, counters, read unsigned) are unchanged; where the chain is live the array is upstream's. Stage test #14 (s6, gcc -O0) keeps [6] in every pass; baseline re-recorded (14 new keys, none missing). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019c7W9nMmArWipVaBuMCy39
mahaloz
added a commit
to sjkim1127/kuna
that referenced
this pull request
Nov 23, 2026
calleefloatreads_armhf.o (clang-assembled Cortex-M4F, recipe in its .s) is fmodf handing __ieee754_fmodf its own s0 and s1, where the callee reads s0 and only spills s1. kuna-calleefloatreads.xml Noelo-Lab#14 pins inner2(a0,a1); the submitted rule printed inner2(a0). Chapter 04 says when the rule defers to calleearitybody. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
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.
AArch64 PLT import-name end-to-end (linked fixture)
src/s1_loader/elf_plt.rs::decode_aarch64already decoded the AArch64 GNUldimport veneer (per
docs/missing-analyses.md§1), but the proof was synthetic:the decoder was only unit-tested against hand-assembled veneer bytes. The x86
paths had a real linked binary console gate (
verify_w11_elf_plt_names);AArch64 had no linked fixture. A dev container with the AArch64 toolchain +
linker (
aarch64-linux-gnu-gcc 11.4.0) makes the linked build possible in-env(unlike the still-blocked ARM decode e2e — no ARM/Thumb linker on host).
BEFORE
PLT decode unproven on AArch64 — no linked fixture. The AArch64 arm of
decode_plt_sectionwas exercised only byaarch64_plt_decodeagainst syntheticbytes. (Confirmed by temporarily stubbing the arm:
mainthen renders thePLT-stub placeholders.)
AFTER
Linked AArch64 binary
plt_aarch64(ET_EXEC, Machine AArch64, dynamic;.plt+.rela.plt+ DT_PLTGOT), builtaarch64-linux-gnu-gcc -O0 -no-pie.main'sbl 0x4004d0/bl 0x4004e0resolve to the imported names via the veneer decode(
adrp x16, GOT_page; ldr x17,[x16,#lo12]):The new e2e
decompiler/crates/kuna-console/tests/verify_aarch64_plt.rs(modeledon the x86 gate) drives
bootstrap_from_elf -> load function main -> decompile -> print Cand assertsputs(/printf(render andsub_4004d0/sub_4004e0aregone. The test actually decodes (does not skip) — same specs-absent skip
guard as the x86 gate (needs the built
AARCH64.sla).No
elf_plt.rsfix / gapNone needed.
decode_aarch64already handled this binary's veneer layoutcorrectly; the change is purely additive (new fixture + new e2e + README
provenance +
Increment 19log;elf_plt.rsis untouched).Fixture
decompiler/crates/kuna-analysis/tests/fixtures/plt_aarch64(9056 bytes),source
plt_aarch64.c(maincallsputs("hello")thenprintf("%d\n", argc)).main=0x400604,puts@plt=0x4004d0(GOT0x411018),printf@plt=0x4004e0(GOT
0x411020); bothR_AARCH64_JUMP_SLOTin.rela.plt. VMAs pinned as consts.Gates
make test→ 675/675 PARITY OKmake test-stages→ 158/158 PARITY OKmake rust-test→ green (verify_aarch64_plt1 passed)Additive real-ELF-path change → the XML datatest/stage gates are structurally
unaffected (the
<binaryimage>bootstrap never runs the ELF loader).🤖 Generated with Claude Code
https://claude.ai/code/session_01FvRnfTgYKoZvS2TEvdYpWb