Repository navigation
Stage reorg - #5
Merged
Merged
Conversation
Physically reorganize the 111 flat module files under decompiler/crates/kuna-decomp/src/ into stage-named folders that mirror the normative stage model (docs/stages.md, docs/stage-mapping.md), so the tree is self-documenting and ready for the program-prep analyses we will port next: substrate/ p0_knowledge/ s1_partition/ s2_lift/ s3_dataflow/ s4_calls/ s5_types/ s6_variables/ s7_regions/ s8_structure/ s9_emit/ infra/ Mechanism: each folder is a private module group (folder/mod.rs lists its `pub mod`s); lib.rs re-exports them flatly (`pub use <folder>::*;`). Module names are unchanged, so every public path (kuna_decomp::flow) and internal path (crate::dtype) resolves exactly as before -- a pure file move, no consumer edits. Files moved with their companion test dirs as a unit so native child-module resolution is preserved. S8 gets its own folder (s8_structure/blockaction) distinct from S7 (s7_regions: the angr RegionIdentifier port), separating the region tree (S7) from the structured-AST artifact (S8). Verified behavior-preserving: make rust-test -> 3753 passed / 0 failed make test -> 675/675 assertions, PARITY OK Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01UxbihRzfHpqx2DWVV7Nn5B
Create decompiler/crates/kuna-analysis/ as the home for the loader/analyzer
tier Ghidra runs as "Run Analysis" (the layer kuna's C++-decompiler port did
not inherit). It depends on kuna-sleigh + kuna-decomp -- sitting above the
decompiler so a pass can read the parsed object AND seed the engine's
symbol/type tables:
kuna-base/num -> kuna-sleigh -> kuna-decomp -> kuna-analysis -> kuna-console/cli
Moved out of kuna-sleigh (zero behavior change -- the moved files are each
other's only callers): the ELF PLT/GOT markup (elf_plt.rs -> s1_loader/elf_plt.rs),
the real-ELF LoadImage backend (loadimage_object.rs), and tests/fixtures/. The
`object` dependency moves with them, off kuna-sleigh. Rewired
kuna-console::engine + the console e2e test to the new path.
Added pass.rs: the AnalysisPass interface -- the generalized elf_plt contract
(a focused, additive, never-failing producer of facts) + run_analyses() merge
driver -- the seam future analyses (strings, demangling, DWARF, function-start,
prototypes) plug into. Modules are grouped by the stage they feed (s1_loader/,
and stubs for s1_strings/ etc.), mirroring the kuna-decomp stage-folder scheme.
Docs: docs/missing-analyses.md gains the crate-home description, the
AnalysisPass interface, and a ranked port roadmap with concrete testcases (the
do-first shortlist: string-literal detection, demangling, no-return detection);
docs/stages.md gains a stage->folder layout table; docs/{agents,stage-mapping}.md
note the new crate + stage-folder organization; docs/PROGRESS.md logs the session.
Verified:
cargo build --workspace -> ok
kuna-analysis tests -> 12/12 (relocated fixture + per-arch decoder tests)
console ELF e2e -> 1/1 (fauxware -> puts/read still named)
make rust-test -> 3753 passed / 0 failed
make test -> 675/675 assertions, PARITY OK
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01UxbihRzfHpqx2DWVV7Nn5B
This was referenced Jun 23, 2026
mahaloz
added a commit
that referenced
this pull request
Jun 26, 2026
Add `DwarfLinesPass` (kuna-analysis/src/s1_dwarf/lines.rs), the kuna analog of Ghidra's DWARFLineInfoCommentScript: parse `.debug_line` with gimli, map each instruction PC to its source `file:line`, and surface it as a `Comment::user2` on the decompiled output via the existing comment subsystem (arch.commentdb -> PrintC::setup_comments -> CommentSorter -> emit_line_comment, the `/* ... */` line the printer already emits for warnings). No printer change needed. A new `AnalysisOutput::comments` channel + `CommentFact` type carry the facts; the console commit (commit_analysis_output step 9) installs each into arch.commentdb via add_comment_no_duplicate(USER2, ...). Each row is bucketed onto its owning subprogram [low_pc,high_pc) range so the printer's comments_for(funcaddr) retrieves it. end_sequence rows are skipped. Gated default-OFF behind `--option dwarf_lines on|off` (it changes the output), registered end-to-end: stages.toml, KUNA_OPTION_NAMES, Architecture (field/ctor/reset/set_kuna_option), engine.rs::analysis_pass_enabled (explicit arm). Settable count 49->50; goldens regenerated (stage_catalog.json, docs/assertions.md). KUNA-CATALOG #5/#9 stage-test max bound 50->60 (the catalog script runs full + single, so use_when/change_kind count is settables+1). Tests: s1_dwarf/lines/tests.rs (0x1357->debug_symbol.c:122 parse, end_sequence skip, range bucketing) + e2e dwarf_lines_annotate_source_locations in verify_s1_dwarf.rs (gate-on annotates, gate-off byte-identical). Gates: make test 675/675 PARITY OK, make test-stages 200/200 PARITY OK, kuna catalog --check OK. Default decompile speed unchanged (pass runs only when the gate is on). docs/analysis-port-log.md Increment 47. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01PoywQpWT2aEJgJiy7oHemD
mahaloz
added a commit
that referenced
this pull request
Jun 26, 2026
…32) (#101) THE PAYOFF for the FID port: wire the FID mechanism (PR1's Sleigh::instruction_mask, PR2's byte-exact FNV-1a64 hasher, PR3's .fid DB + generator) into a default-off Listing/xref consumer that re-identifies a function in a STRIPPED binary purely by its instruction-stream fingerprint. Before/after on the stripped, static, -no-pie x86-64 fixture tests/fixtures/fid/prog (kuna_crc32 @ 0x4017c0): --option fid off (default) -> sub_4017c0 --option listing on --option fid on -> kuna_crc32 (+ kuna_fid_db=tests/fixtures/fid/lib.fid) The binary is stripped (no symbol table), so the function is the engine placeholder sub_4017c0 by default; FID renames it to kuna_crc32 by a full-hash match against the vendored lib.fid. Same body (the CRC-32 loop, 0xedb88320), only the name changes. Wiring (each piece a clone of the noreturn_disc consumer): - s1_fid/mod.rs FidPass (id "fid", S1): inert without the Listing AND without a configured DB (kuna_fid_db env var). Hashes each listing.functions() entry over the [entry,next) extent via the same build::fingerprint_from_mask projection the generator uses; pick_unique_name emits a name only when the full-hash bucket collapses to one name (never guesses on a tie). - pass.rs FidMatch + AnalysisOutput.fid_names + merge. - engine.rs FID rename commit arm (after the no-return arm): resolve by address, rename only behind the is_generic_placeholder_name label gate (sub_/func_/FUN_/LAB_, never a real .symtab/DWARF name) + the "fid" => analysis_fid gate. - Option surface: architecture.rs field/default/reset/set_kuna_option, options.rs KUNA_OPTION_NAMES, stages.toml [[settable]] fid block, settable count 60 -> 61 (tests.rs count/comma/PASS_GATES, catalog_bytecompat.rs, kuna-catalog.xml #5/#9 max 61->62), regenerated stage_catalog.json + docs/assertions.md. - DB path from the kuna_fid_db env var (a --fidb flag is deferred). Real-ELF-path-only + default-off => the XML datatest path never builds a Listing or runs FID, so the 675/158 oracles are structurally untouched. Gates: make test 675/675 PARITY OK; make test-stages 222/222 PARITY OK; make rust-test green incl. the new verify_fid e2e (2 tests, ran not skipped); kuna catalog --check catalog OK. Claude-Session: https://claude.ai/code/session_01FvRnfTgYKoZvS2TEvdYpWb Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
mahaloz
added a commit
that referenced
this pull request
Jun 26, 2026
…post-rebase After rebasing onto main (FID PR4 #101 brought settables to 61), the combined tree has 62 settables; the console 'stage catalog' + 'stage catalog returnpair' emits 63 use_when / change_kind entries (62 + returnpair double-count), so bump the KUNA-CATALOG #5/#9 max from 62 to 63. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01PBrckq3YYAzBLq5k4KpWac
mahaloz
added a commit
that referenced
this pull request
Jun 26, 2026
New S8 structuring pass `ActionDedupIteTail` (option `dedupitetail`, ElementId
4109, default-OFF) — the inverse of the SAILR duplication passes
(gotoreduce/crossjumprevert/taildup). kuna inherits Ghidra's collapse-based
structurer, which clones a basic block reachable from both arms of an if/else
into each arm instead of converging the two predecessors onto one copy. This
pass detects when both arms of a 3-component BlockIf share a maximal common
PREFIX or SUFFIX of leaf blocks that emit identical C and hoists that shared run
out of the if (prefix before, suffix after), emitting one copy instead of two.
Equivalence is exact-or-decline: same printed-op sequence, constants matched by
value, named storage by location, call targets by resolved callee (op-wise via
get_call_specs_index), block-local unique temps paired positionally; STORE and
unresolvable operands decline. The transform is a pure print-tree edit (no p-code
cloned, SSA/def-use untouched): a prefix hoist is unconditionally sound (both
arms run it first); a suffix hoist is gated on both arms' divergent middles
falling through to it. Bounded (<=8 leaves, <=64 ops/leaf) and only flat
unlabelled leaves are merged. Surgery helpers kuna_hoist_ite_{prefix,suffix} in
block.rs, with unwrap_singleton_clause to avoid the degenerate 1-element BlockList
the PrintC emitBlockLs path double-emits.
Registered everywhere: stages.toml (settable -> 64), options.rs
KUNA_OPTION_NAMES, architecture flag/ctor/reset/parse/seam-copy, seams.rs,
universalaction (after crossjumprevert). Catalog/count fixtures bumped
(catalog_bytecompat 64, kuna_stages settable_count_is_64, verify_w8 265 leaves +
order, stage_catalog.json regenerated, list_action oracle, kuna-catalog.xml
#5/#6/#7/#9). docs/assertions.md regenerated; `kuna catalog --check` OK.
Two-pass stage test tests/stages/ghangr-true-1804-dedup-ite-tail-8a690c.xml
(minimised x86-64 reproducer, the who.o/morton convention): off clones the shared
epilogue into both arms (2 copies), on merges to 1 and logs the dedup.
Gates: `make test` PARITY OK 675/675 (byte-identical, default-OFF);
`make test-stages` PARITY OK 233/233. Speed: no measurable change (~0.20s on
usage off vs on). NOTE: the target true_1804::usage tail is sub-block-entangled
(the online-help printf shares a bblock with the setlocale condition test), so it
needs the full label-convergence transform and is out of scope for this bounded
leaf hoist — the pass is sound/general and the stage test uses the reproducer.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01PBrckq3YYAzBLq5k4KpWac
mahaloz
added a commit
that referenced
this pull request
Jun 26, 2026
Union both opt-in settables atop main: dedupitetail (4109, #104) + unrolledguard (no ElementId, #105). Resolved by UNION (no registration dropped): - stages.toml: 65 settables, 98 surfaces; header counts updated - kuna_stages/tests.rs: settable_count_is_65, surface_count_is_98, 64 trailing commas in the static catalog - catalog_bytecompat.rs: 65 "option" rows - xml.rs corpus count: 155 (83 datatests + 72 stage testcases) - kuna-catalog.xml provenance: #6 source_decompiler angr=24, #7 structure-recovery=13 (+dedupitetail), #8 opt-in-tool=12 (+unrolledguard), #5/#9 use_when/change_kind max bumped 65->66 (65 settables + returnpair dup) - baseline-stages.json + assertions.md regenerated (235/235) Gates: catalog --check OK; make test PARITY OK 675/675; make test-stages PARITY OK 235/235; make rust-test green. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01PBrckq3YYAzBLq5k4KpWac
mahaloz
added a commit
that referenced
this pull request
Jun 27, 2026
…, x86+x64) (#108) PR 1 of 3 of the PE/Mach-O deep-metadata frontier (canonical design in the co-landed docs/metadata-analyzers-design.md). The kuna analog of Ghidra's RttiAnalyzer: on a Windows PE built by MSVC (or clang -target ...-windows-msvc), recover the C++ class names from the run-time type information graph in .rdata/.data. The walk (port of RttiAnalyzer.added(), entirely in the loaded image): find the common type_info vftable (the pointer every RTTI0 TypeDescriptor shares) -> locate the TypeDescriptors by scanning for the `.?A...@@` type-info names -> byte-search back to each CompleteObjectLocator (COL = ref - 12) -> validate the COL -> RTTI3 -> RTTI2 -> RTTI1 -> RTTI0 chain -> demangle each class name -> emit `<Class>::RTTI_Type_Descriptor` / `<Class>::RTTI_Complete_Object_Locator` / `<Class>::vftable` Data labels, so `Box`/`Shape` surface as recovered classes. x86 vs x64 (design 3.1f, isolated in refkind.rs): inter-structure refs are raw VAs on x86 but image-base-relative IBO32 disp32 on x64; the RTTI0 name string sits at TypeDescriptor offset 8 (x86) / 16 (x64). Both verified against the real fixtures. Zero new demangler code: s1_demangle::demangle_rtti_class_name reuses the existing msvc_demangler crate via the Ghidra RttiUtil `??_R0...@8` wrap. Gated default-OFF (--option rtti on), registered in passes_for ONLY for a PE image (the pass also self-gates on PE in run); the facts commit only behind the analysis_rtti gate. Real-PE-path-only + default-off => the XML datatest oracles are structurally untouched. Settable count 65 -> 66; catalog regenerated. Fixtures: clang -target {x86_64,i686}-pc-windows-msvc -fuse-ld=lld -nostdlib emits a linked PE with the genuine MSVC RTTI bytes (a one-cell inline-asm stub supplies the only CRT symbol the Type Descriptors reference, ??_7type_info@@6b@). Both arches vendored with the .cpp source + a README entry pinning the COL/RTTI0/vftable VMAs. Gates: make test 675/675 PARITY OK; make test-stages 235/235 PARITY OK (KUNA-CATALOG #5/#9 max 66 -> 67 -- the catalog script emits the full catalog + one returnpair single-row, so the count is settables+1); make rust-test green incl. the new verify_rtti e2e (4 tests, x64+x86 x on/off, ran not skipped); kuna catalog --check catalog OK. Claude-Session: https://claude.ai/code/session_01FvRnfTgYKoZvS2TEvdYpWb Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
mahaloz
added a commit
that referenced
this pull request
Jun 27, 2026
…109) Add a gated, default-off Mach-O Objective-C metadata analyzer (the kuna analog of Ghidra's ObjcTypeMetadataAnalyzer, name-recovery half). It walks the __objc_* ObjC 2.0 metadata web and renames each IMP function -[Class sel] / +[Class sel] — so a stripped IMP renders -[Greeter greet:] instead of sub_<addr>. The headline before/after, on a (locally-)stripped x86-64 ObjC Mach-O: --option objc off (default) → sub_100000640 int4 sub_100000640(...) { return a2 * 3 + 7; } --option objc on → -[Greeter greet:] int4 -[Greeter greet:](...) { return a2 * 3 + 7; } The walk (design §3.2): __objc_classlist (array of class_t*, stride=ptr) → per class data & FAST_DATA_MASK (~0x7) → class_ro_t → .name (class name) + .baseMethods (the - instance method_list_t); follow class_t.isa to the metaclass baseMethods (the + class methods). The method_list_t walk handles BOTH forms — the large absolute-pointer form AND the small/relative form (entsizeAndFlags & 0x80000000) a modern clang actually emits — resolving the selector (plain ASCII, no demangler), the type encoding, and the IMP VA. Emits the IMP rename via out.fid_names (the label-gated placeholder rename, the FID precedent), plus _OBJC_CLASS_$_<name> + selector symbols. New: kuna-analysis/src/s1_objc/{mod,sections,classt,methods}.rs; kuna-console/tests/verify_objc.rs (the two-state e2e, RUNS not skipped); the vendored macho_objc fixture (a root-class Greeter, built bare-clang + ld64.lld -x, no macOS SDK) + macho_objc.m + a README entry pinning the IMP/class/method-list VMAs. Gate (the fid precedent, full wiring): passes.rs behind a Mach-O-format gate (passes_for(compiler, format)); engine.rs analysis_pass_enabled "objc" => arch.analysis_objc; architecture.rs analysis_objc field/default-false/reset/on_off arm; options.rs KUNA_OPTION_NAMES += "objc"; a [[settable]] objc block in stages.toml cloned from the fid row. Settable count 65 → 66: bumped kuna_num_settables/SETTABLE_TABLE.len, the },\n-comma count (64→65), the catalog "option": count (65→66), objc → PASS_GATES (with_live stays 28), KUNA-CATALOG #5/#9 max (66→67); regenerated stage_catalog.json + docs/assertions.md; kuna catalog --check → OK. Default-off + Mach-O-real-binary-path only ⇒ the parity oracles are structurally untouched: make test 675/675 PARITY OK, make test-stages 235/235 PARITY OK, make rust-test green (incl. verify_objc), kuna catalog --check OK. Claude-Session: https://claude.ai/code/session_01FvRnfTgYKoZvS2TEvdYpWb Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
This was referenced Jun 27, 2026
Merged
mahaloz
added a commit
that referenced
this pull request
Jun 28, 2026
…rder settable The kuna-catalog.xml infra datatest counts catalog keys across the full `stage catalog` render plus the one-row `stage catalog returnpair`: - #5 use_when / #9 change_kind totals: 69 -> 70 (69 settables + the returnpair row) - #6 source_decompiler angr: 24 -> 25 (regionedgeorder is angr-derived) - #7 change_kind structure-recovery: 13 -> 14 (regionedgeorder is structure-recovery) and add `regionedgeorder` to the #6/#7 assertion-name option lists; mirror the two renamed assertions in docs/baseline-stages.json. make test-stages PARITY OK. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01PBrckq3YYAzBLq5k4KpWac
mahaloz
added a commit
that referenced
this pull request
Jul 5, 2026
…icts after returndup #124 merge Serial-merge resolution: returndup (#124) and noreturn_error both bump the shared catalog/corpus counts. Final = base + returndup + noreturn_error: option count 70->71, corpus 158->159, settables 71; noreturn_error is source_decompiler=ghidra / change_kind=correctness-fix so it doesn't touch the angr(#6)/structure-recovery(#7) counts, only use_when(#5)/change_kind(#9). catalog --check OK. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_018DV2MXxQAAWK7xLPBmsq9J
mahaloz
added a commit
that referenced
this pull request
Jul 5, 2026
…n_error Per user directive, ship iteregion default-on (angr ITERegionConverter: assignment diamond -> ?: ternary). 0/675 datatests change (byte-identical corpus even default-on — no per-test opt-outs needed), speed -2.6%. Still a runtime choice: an explicit if/else compiles to the SAME object code, so --option iteregion off reverts per function. Merge resolution after returndup (#124) + noreturn_error (#126) landed on main: - stages.toml: split the two [[settable]] blocks the naive union merged into one; iteregion default=on, returndup default=off. - architecture.rs: default-on line (self.iteregion=true, DIV-17) + restored the option-apply match arm's closing the union merge dropped; seam copy already wired (seam.iteregion). - count-tests: option count 70/71->72, corpus 158/159->160, settables 72, catalog JSON commas 71, kuna-catalog.xml #6 angr 27 / #7 structure-recovery 16 (iteregion is both) / #5/#9 max 80. - action-list golden: iteregion re-inserted after dedupitetail in the oracle (0259), leaf count 266->267, tail array; stage_catalog.json + baseline-stages regenerated. - ghangr-iteregion.xml: pass 1 now explicitly 'option iteregion off' to pin the if/else baseline the default-on pass converts. Gates: make test 675/675 PARITY OK (byte-identical), make test-stages 254/254 PARITY OK. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_018DV2MXxQAAWK7xLPBmsq9J
mahaloz
added a commit
that referenced
this pull request
Jul 31, 2026
…tor was absorbed Adversarial review finding (confirmed with a compiled repro): in a VALUE position, op_bool_negate_ir granted CONDITION_CONTEXT unconditionally, so 'v = !(x == 0)' (BOOL_NEGATE absorbed via the negate-token flip, then the flipped comparison truthy-elided) rendered 'v = x' — assigning the raw value where the source assigns 0/1. Same defect in the double-negation arm. The printed-'!' arm is the only one that may CREATE the context (the printed operator re-booleanizes); the absorbed/cancelled arms now only propagate a bit a genuine boolean consumer already established. Regression: kuna-cnorm-truthycond.xml gains vfn (clang -O1 x86_64 of a setne+sete pair sharing one test, the shape where the BOOL_NEGATE survives to print) + sink stub; asserts #5-#6 pin 'sink((uint4)(x != 0))' in BOTH passes and that the elided form never appears. Stages baseline re-recorded (294/294). [AUTOMATED] Produced by an automated agent session (adversarial review pass). Co-Authored-By: Claude Fable 5 <[email protected]>
mahaloz
added a commit
that referenced
this pull request
Jul 31, 2026
Three confirmed defects in the DIV-38 EOL-warning machinery, all with
concrete wrong-output repros:
(A, critical — invalid C) A warning attached inside a comma-separated loop
header (e.g. "Read-only address is written" on a store in a while/for
CONDITION block) flushed from emit_basic_block_ops' statement loop while
still INSIDE the parens, so the '// slug' commented out the rest of the
header: 'while (x // writes-rodata) {' — unbalanced braces. The statement
flush is now suppressed under COMMA_SEPARATE; those slugs ride to the
header's own post-brace flush point. (The if path was immune — its
ONLY_BRANCH arm returns before any flush — which is why the gates stayed
green.)
(B, major — dropped/misattributed warnings) do-while tails, the
while(true) overflow form, switch headers, and BlockGoto had no flush
point, so a warning landing in those constructs stayed pending: silently
missing from its owner and later flushed onto an unrelated line — or, on
the shared arch-owned PrintC in decompile-all, onto the NEXT function's
prototype. Added flush points to all four, plus a defensive clear at
begin_function and an end-of-body drain before the closing brace, so a
slug can never be dropped or cross a function boundary.
(C, major — invalid C) Under 'braceformat function same' the prototype
flush ran BEFORE open_brace_indent, so the brace landed inside the comment
('void f(void) // inlined: foo {'). The prototype path now emits the brace
first when the style shares the line.
Regression: kuna-cnorm-warnstyle.xml gains wa_fn — a while loop whose
condition block stores to a readonly global under 'option readonly on',
the exact (A) shape — asserting the header stays intact with the slug
after '{' (#4) and that the slug never appears inside the parens (#5).
Stages baseline re-recorded (301/301); datatests 675/675 unchanged.
[AUTOMATED] Produced by an automated agent session (adversarial review pass).
Co-Authored-By: Claude Fable 5 <[email protected]>
mahaloz
added a commit
that referenced
this pull request
Aug 19, 2026
…delta-review findings [AUTOMATED] The branch was RED on its own gate: `ghidra_sim_sort_grep_breadth` (the #[ignore]d breadth test `make test-ghidra` and the CI gates job run with `--include-ignored`) failed on tests/bug-repro/sort::sub_6370 with "NO <vardecl symref> resolves against <localdb>". ROOT CAUSE (a port gap, not a heuristic). sub_6370 declares `char v1 [16]` and `char v2 [24]`, two stack aggregates used ONLY as `memcmp(v1,v2,0x10)` — i.e. reached exclusively through a `&sym` reference. The whole HighVariable of such a variable is the CONSTANT PTRSUB offset operand (one instance, const space, is_constant=true, is_addr_tied=false), so `kuna_link_high_symbols` skips it at the constant guard and `kuna_high_symbol_wire_id`'s re-derivation loop — which only scans addr-tied instances — cannot see it either. Both declarations fell back to the varnode create index; 2 of 2, hence "wholesale". The Symbols were in <localdb> the whole time (v1/v2, cat -1, real ids). `Funcdata::link_symbol_reference` copies the referenced Symbol's name, offset and type onto that high but DROPPED its identity, where upstream `Varnode::setSymbolReference` (varnode.cc:465) → `HighVariable::setSymbolReference(entry->getSymbol(), off)` (variable.cc:283) carries the Symbol itself. The identity is now recorded (`HighVariable::kuna_ref_symbol`, local scope only) and read by the declaration's symref. Deliberately a SEPARATE field from `kuna_link_symbol`: that one feeds <high symref>, and such a high encodes class="constant", where Java's HighConstant.decode does nothing with a mapped local symref — so nothing is gained there, and keeping it out preserves the one-owner invariant `ghidra_sim_faillog_high_symrefs_are_not_shared_with_params` asserts. This also closes the pinned residual: PIN_FAILLOG_VARDECL_UNRESOLVED moves [0,1,0] -> [0,0,0] (sub_3320's survivor was the same class). Every declaration in the corpus now resolves; the pin doc states ZERO is the contract. TEST HYGIENE (a harness bug, fixed here). The previous round's recorded verification ran `cargo test -p kuna-ghidra --release` WITHOUT `--include-ignored` — its log reads "ghidra_sim_sort_grep_breadth ... ignored" — so the breadth test was never executed locally and nothing said so. `make test-ghidra` now tees its output and fails on TWO canaries: the CI skip canary (specs missing/unusable => every sim test skips and passes vacuously; worktrees hit this because KUNA_SPECS/SLEIGHHOME do not reach the cargo suites), and a breadth canary demanding the literal "test ghidra_sim_sort_grep_breadth ... ok" line. The breadth test itself now asserts 0 unresolved PER TARGET (the generic "resolved > 0" gate only catches wholesale breakage; a 20/20 -> 1/20 regression passed silently). DELTA-REVIEW FINDINGS (batched): #2 HIGH `add_param_symbol` promoted ANY storage-OVERLAPPING symbol into parameter slot i. Upstream `ProtoStoreSymbol::setInput` (fspec.cc:3150) does the opposite — it looks up BY SLOT and removes+recreates on an addr/size mismatch; it never promotes an unrelated local. And this runs in ActionRestructureVarnode (standalone included) where `clear_unlocked_category_negative` only clears cat<0, so a wrong promotion is permanent. Now categorizes only on an EXACT (addr,size) match; comment rewritten to the real mechanism and both failure modes (checkFullCommit's storage compare; getDatabaseParameter keying the DB slot off getCategoryIndex). #3 MED WireSymbol::encode bypassed the 0-size-type filter added for scope symbols (MappedEntry.decode throws and Java discards the whole result). `kuna_link_high_symbols` now routes a 0-sized dtype to the HASHED shape (DynamicEntry.decode has no size check) and `WireSymbol::is_encodable` is the backstop in both the encode and the id set. #4 MED <vardecl symref> was not filtered through the encodable predicate. Every branch of `kuna_high_symbol_wire_id` now passes `ScopeLocal::symbol_is_encodable` (new O(1) single-symbol form — the set build would run per declaration on every decompile). #5 MED `kuna_apply_dynamic_recommendations` runs at the TOP of the naming pass, where the ported isNameUndefined guard is vacuous, and it CREATES a Symbol where upstream RENAMES one. kuna fuses linkSymbols with the vN assignment into one walk, so there is no "after linking, before defaults" point to move it to; the equivalent guard is applied against the SCOPE instead — a hash landing on storage the walk will bind to a function_parameter, or to any Symbol with a defined name, is skipped. Also: find_varnode's `vnlist2[pos]` is a checked `.get()` (the hash is host-supplied), and the hardcoded budget of 8 carries the "deliberately not `dynamichashmax`" note. #6 MED the WIRE arm of encode_high skipped the encodable_symbols guard; `encodable` is empty for a has_no_code() function, so class="local" + symref against a <localdb> never written is the HighLocal.decode hard-throw. Wire arm now takes the same gate (falls to class="other"). #7 LOW Funcdata::clear() left kuna_wire_symbols / kuna_wire_symbol_for_high behind — HighVariableId-keyed maps outliving the arena that issued the ids. #8 LOW declaration tokens carried `varref`; upstream emitVarDecl pushes an explicitly NULL Varnode, and the omission is load-bearing (ClangVariableToken.getHighVariable returns inst.getHigh() from inside its `inst != null` block and never reaches the parent-decl fallback). Dropped; the create index remains the symref fallback. #9 LOW slot skew: `to_pieces` compacts out params with no dtype while param_storage carried absolute rp.index. Both now use the compacted basis. #10 LOW live rig: `len(before) >= 2` hard-failed on a one-local function (now >= 1, with a NOTE at 1), and the param rename target + its recorded old name now both come from the post-commit result. Doc correction (reviewer-verified): checkFullCommit inspects the parameter count, each categoryIndex and each storage — never the model name. The C6 prose in docs/spec/00-overview.md claimed otherwise; corrected to "the storage echo is the load-bearing half". Spec prose also gains the &symbol identity record, the vardecl encodable filter, and the dynRecommend placement divergence; ghidra-integration.md's deferred list is re-cut. Gates: make test 675/675 PARITY OK; make test-stages 484/484 PARITY OK; make rust-test green; make check-spec OK; make test-ghidra green WITH the breadth test proven to have run (11 sim tests, 6/6 breadth targets at vardecl_unresolved=0). C text byte-identical — c_lines 283/39/92 and every other faillog pin unchanged. No baseline re-pins, no options, no DIV rows. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AfGYKwUWvPYYj1Aw7tcLhC
mahaloz
added a commit
that referenced
this pull request
Aug 19, 2026
…pe, switch recovery, real signatures in the GUI) (#319) * feat(ghidra): Phase 4 — full decompileAt response encode (rename/retype, switch recovery, real signatures) [AUTOMATED] The decompileAt response now carries the complete first-<function> document in the upstream child order (funcdata.cc:734): <addr> + <localdb> + <ast> + <highlist> + <jumptablelist> + <prototype>, plus <parammeasures> under the paramid action — everything the native Ghidra GUI features consume. Encoders (kuna-decomp, all upstream-faithful ports over PackedEncode): - Datatype::encodeRef/encode/encodeBasic/encodeTypedef (type.cc:462-560) + TypeField/TypeBitField::encode; get_unsized_id/has_same_variable_base completed through the existing hash_size; decode_integer_format added. Differential-tested against the shipped decode side (encode_ref output re-interns to the identical Rc through decode_type). - FuncProto::encode (fspec.cc:4625) + EffectRecord::encode + the model-diff effect/likelytrash lists; params travel as <localdb> cat-0 symbols (the upstream symbol-backed-store wire shape). - ScopeLocal::encode (varmap.cc:462) -> Database::encode_scope + Symbol::encode{_header,_body} + SymbolEntry::encode (database.cc:187-2660): nonzero ids always, >=1 entry per mapsym, positional <parent>+<rangelist>, cat-0 params with slot index + exact storage. - Funcdata::encode_high (funcdata.cc:658) + HighVariable class rules (variable.cc:839) + the encode-time symbol-link pass kuna_link_high_symbols (the ActionNameVars::linkSymbols stand-in for kuna's string-named highs; runs only from Funcdata::encode, standalone path untouched). - Funcdata::encode_jump_table over the already-ported JumpTable::encode, emitted independently of savetree; session jumpload toggle reaches FlowInfo::record_jumploads per decompile. - ParamIDAnalysis unstubbed (the justproto arm reads the real recovered FuncProto); <rank> always emitted; the paramid action answers a parammeasures-ONLY doc (ghidra_process.cc:318). Symbol-id echo discipline (r5 §5): invented symbols carry internal SYMBOL_ID_BASE-range ids; globals echo the REAL host DB id (GlobalEntry/GlobalContainer::symbol_id from the getMappedSymbols record) and symref is OMITTED when unknown — never fabricated. Rename/retype persistence loop: the function <localdb> answer's non-param locals decode (RemoteLocalVar) and seed the fresh Funcdata — typelocked locals as mapped/usepoint symbol seeds, plain renames (typelock=false, the GUI-rename shape) as ScopeLocal::nameRecommend records (the C++ mechanism: such symbols never survive clearUnlockedCategory(-1)), applied by the ActionNameVars port (recommended_name_for, varmap.cc:1050 arms). Markup type-token fidelity: EmitMarkup::tag_type splits rendered declarators into word <type> tokens + <syntax> separators, so Java's getC() (IllegalCharCppTransformer) no longer mangles "unsigned long *" into unsigned_long__; markup-emitter-only, standalone bytes identical. Harness: parse_decompile_doc decode-validates the full response the way Java would; assert_phase4_traps asserts every r5 §3 hard-throw per function; new switch-analyzer-shape, paramid-shape, and rename-persistence echo-back tests. Pins: mangled [57,10,24]->[0,0,0]; diff bands [0.10..0.34]->[0.02..0.15] (measured 0.050/0.079/0.099); c_lines unchanged. Live-verified on stock Ghidra 12.1.2 (fmt::main, the committed integrations/ghidra/live-smoke/phase4_features.py rig): real signature, rename/retype round-trips that persist re-decompiles and hit the RIGHT DB variable, DecompilerSwitchAnalysisCmd rebuilding all 10 case references from kuna's jumptablelist, HighParamID decoding. Gates: make test 675/675 PARITY OK, make test-stages PARITY OK, make rust-test green, make check-spec OK, make test-ghidra green. No baseline re-pins, no new options, no ghidra-mode default changes. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AfGYKwUWvPYYj1Aw7tcLhC * docs(ghidra): Phase-4 spec prose + integration-doc state [AUTOMATED] Spec-live prose for the Phase-4 encoders in their owning chapters: 00-overview (the full-response encode, the encode-time symbol-link pass, symbol-id echo discipline, the paramid doc shape, the rename/retype persistence loop), 04 (FuncProto::encode), 05 (the Datatype::encodeRef wire marshal-out), 06 (ScopeLocal::encode + the NameRecommend port). docs/ghidra-integration.md: the Phase-4 checklist (shipped vs deliberately deferred) and the §9 seam-table rows (Funcdata::encode, TypeFactory marshal-out, ParamIDAnalysis, DB-symbol-id echo). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AfGYKwUWvPYYj1Aw7tcLhC * fix(ghidra): Phase-4 review round — declaration symrefs, dynamic-storage renames, conflict-safe symbol ids [AUTOMATED] Six confirmed findings from the adversarial review of PR #319. C1/C5 (id-contract hole): the markup's `<vardecl symref>` still emitted the Phase-2 varnode-create-index placeholder, which can never resolve now that every real id is SYMBOL_ID_BASE-range — Java logged "Invalid symbol reference" per declaration per decompile and rename/retype was DEAD on declaration-line tokens. The symbol-link pass now runs BEFORE the markup is printed and the declaration carries the real LocalSymbolMap id plus the representative's varref; the create-index survives only as the fallback for a high the analysis left symbol-less. Making the reorder safe required the link pass to stop mutating the analysis scope: it now emits WIRE-ONLY symbols (`database::WireSymbol`) that are encoded into `<localdb>` and referenced by `<high symref>`/`<vardecl symref>` but never enter the scope, so the pass cannot perturb the printed C at any point in the sequence. (The first attempt DID move it — ghidra-sim's `c_lines` pin caught +1 line on faillog sub_2620 — which is why the design changed.) C2 (HIGH, renames reverted in front of the user): host locals whose only SymbolEntry is a `<hash>` DynamicEntry were dropped on decode. That is the storage class Java writes for every `requiresDynamicStorage` variable (unique-space representatives, `splitOutMergeGroup` products), so renaming such a variable silently reverted on the next decompile. Hash entries are now kept (`RemoteEntry::hash`, `RemoteLocalVar::hash`) and applied through the full upstream mechanism: `ScopeLocal::dynRecommend` + `recoverNameRecommendationsForSymbols`'s hash loop (`Funcdata::kuna_apply_dynamic_recommendations` over `DynamicHash::findVarnode`, run at the top of the naming pass), with typelocked ones seeded as dynamic Symbols. Hashes use the upstream budget of 8 because Java hardcodes the same (`DynamicHash.java:440`) and a disagreeing hash cannot round-trip. C3: name recommendations matched only the high's NAME REPRESENTATIVE's def address; upstream's `findVarnodeWritten` matches ANY varnode of (size,addr) written at the usepoint, so a rename recorded at a non-representative instance reverted. Now matched across every instance, plus upstream's `!sym->isNameUndefined()` guard (never paint over a resolved symbol) and a cat-0 guard (a parameter's name comes from the prototype). C4 (wrong-target rename): the encode-time link pass bound any unattached named high to the smallest containing SymbolEntry with none of the naming pass's conflict logic — so a high the naming pass deliberately routed to `vN` because binding it was a storage CONFLICT inherited the PARAMETER's symbol id, and renaming that variable in the GUI renamed the parameter. The naming pass now RECORDS its bind decisions (`HighVariable::kuna_link_symbol`) and the encode materializes symbols only for highs left unbound — a covered-but-unbound high gets a data-flow-HASHED wire symbol (upstream `buildDynamicSymbol`), never the conflicting entry's id. C6: the decoded cat-0 parameter storage and the `<prototype model=…>` were parsed and discarded, so kuna echoed model-rederived storage and Java's `checkFullCommit` force-committed a kuna-rederived signature over the user's on any parameter rename. Both now ride through (`RemoteParam::storage`, `RemoteFunctionFacts::{model,param_storage}` → `apply_locked_prototype_with_model` + `apply_mapped_params`), and `add_param_symbol` categorizes an existing overlapping entry as the parameter slot instead of skipping it. LOWs: `encode_scope`'s defensive symbol skips now also withhold the id from `<high symref>` (`Database::encodable_symbol_ids` — an orphan reference is the Java hard-throw the skip exists to avoid); the harness asserts the r5 §3 0-sized-data-type trap; the live rig's two vacuous PASS criteria are real (collateral detection commits the decoded locals first, and the param rename asserts decoded-vs-DB storage/ordinal equality BEFORE renaming, so a forced full commit can no longer masquerade as an in-place edit). Tests: a unit test drives the dynamic-recommendation mechanism end to end (hash a varnode, seed the recommendation, apply, assert the name and Symbol land on that variable); a sim test asserts no `<high>` borrows a cat-0 parameter's symref; the harness pins unresolvable `<vardecl symref>`s (0/1/0 — the systemic case is fixed, one group-member residue documented). All other pins unchanged, C text byte-identical (c_lines 283/39/92). Live-verified on stock Ghidra 12.1.2 (fmt::main): 13/13 checks PASS, including the strengthened ones — 21 committed DB variables for collateral detection and decoded param storage/ordinals equal to the database. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AfGYKwUWvPYYj1Aw7tcLhC * docs(ghidra): Phase-4 review-round prose — wire symbols, the four persistence channels, dynRecommend [AUTOMATED] 00-overview: the naming pass's recorded bind decision vs the encode-time WIRE-ONLY symbols (and why the encode never re-derives a container binding — a conflict-separated high must not inherit the parameter's id), the four rename/retype persistence channels (mapped/dynamic × typelocked/rename-only), and the host model + exact parameter storage echo. 06: the dynamic (hash-keyed) recommendation list beside the address-keyed one. ghidra-integration.md: the review-round checklist entry and the two remaining deferred items (including the pinned single unresolved <vardecl symref>). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AfGYKwUWvPYYj1Aw7tcLhC * fix(ghidra): Phase-4 round 2 — the &symbol declaration symref, and 9 delta-review findings [AUTOMATED] The branch was RED on its own gate: `ghidra_sim_sort_grep_breadth` (the #[ignore]d breadth test `make test-ghidra` and the CI gates job run with `--include-ignored`) failed on tests/bug-repro/sort::sub_6370 with "NO <vardecl symref> resolves against <localdb>". ROOT CAUSE (a port gap, not a heuristic). sub_6370 declares `char v1 [16]` and `char v2 [24]`, two stack aggregates used ONLY as `memcmp(v1,v2,0x10)` — i.e. reached exclusively through a `&sym` reference. The whole HighVariable of such a variable is the CONSTANT PTRSUB offset operand (one instance, const space, is_constant=true, is_addr_tied=false), so `kuna_link_high_symbols` skips it at the constant guard and `kuna_high_symbol_wire_id`'s re-derivation loop — which only scans addr-tied instances — cannot see it either. Both declarations fell back to the varnode create index; 2 of 2, hence "wholesale". The Symbols were in <localdb> the whole time (v1/v2, cat -1, real ids). `Funcdata::link_symbol_reference` copies the referenced Symbol's name, offset and type onto that high but DROPPED its identity, where upstream `Varnode::setSymbolReference` (varnode.cc:465) → `HighVariable::setSymbolReference(entry->getSymbol(), off)` (variable.cc:283) carries the Symbol itself. The identity is now recorded (`HighVariable::kuna_ref_symbol`, local scope only) and read by the declaration's symref. Deliberately a SEPARATE field from `kuna_link_symbol`: that one feeds <high symref>, and such a high encodes class="constant", where Java's HighConstant.decode does nothing with a mapped local symref — so nothing is gained there, and keeping it out preserves the one-owner invariant `ghidra_sim_faillog_high_symrefs_are_not_shared_with_params` asserts. This also closes the pinned residual: PIN_FAILLOG_VARDECL_UNRESOLVED moves [0,1,0] -> [0,0,0] (sub_3320's survivor was the same class). Every declaration in the corpus now resolves; the pin doc states ZERO is the contract. TEST HYGIENE (a harness bug, fixed here). The previous round's recorded verification ran `cargo test -p kuna-ghidra --release` WITHOUT `--include-ignored` — its log reads "ghidra_sim_sort_grep_breadth ... ignored" — so the breadth test was never executed locally and nothing said so. `make test-ghidra` now tees its output and fails on TWO canaries: the CI skip canary (specs missing/unusable => every sim test skips and passes vacuously; worktrees hit this because KUNA_SPECS/SLEIGHHOME do not reach the cargo suites), and a breadth canary demanding the literal "test ghidra_sim_sort_grep_breadth ... ok" line. The breadth test itself now asserts 0 unresolved PER TARGET (the generic "resolved > 0" gate only catches wholesale breakage; a 20/20 -> 1/20 regression passed silently). DELTA-REVIEW FINDINGS (batched): #2 HIGH `add_param_symbol` promoted ANY storage-OVERLAPPING symbol into parameter slot i. Upstream `ProtoStoreSymbol::setInput` (fspec.cc:3150) does the opposite — it looks up BY SLOT and removes+recreates on an addr/size mismatch; it never promotes an unrelated local. And this runs in ActionRestructureVarnode (standalone included) where `clear_unlocked_category_negative` only clears cat<0, so a wrong promotion is permanent. Now categorizes only on an EXACT (addr,size) match; comment rewritten to the real mechanism and both failure modes (checkFullCommit's storage compare; getDatabaseParameter keying the DB slot off getCategoryIndex). #3 MED WireSymbol::encode bypassed the 0-size-type filter added for scope symbols (MappedEntry.decode throws and Java discards the whole result). `kuna_link_high_symbols` now routes a 0-sized dtype to the HASHED shape (DynamicEntry.decode has no size check) and `WireSymbol::is_encodable` is the backstop in both the encode and the id set. #4 MED <vardecl symref> was not filtered through the encodable predicate. Every branch of `kuna_high_symbol_wire_id` now passes `ScopeLocal::symbol_is_encodable` (new O(1) single-symbol form — the set build would run per declaration on every decompile). #5 MED `kuna_apply_dynamic_recommendations` runs at the TOP of the naming pass, where the ported isNameUndefined guard is vacuous, and it CREATES a Symbol where upstream RENAMES one. kuna fuses linkSymbols with the vN assignment into one walk, so there is no "after linking, before defaults" point to move it to; the equivalent guard is applied against the SCOPE instead — a hash landing on storage the walk will bind to a function_parameter, or to any Symbol with a defined name, is skipped. Also: find_varnode's `vnlist2[pos]` is a checked `.get()` (the hash is host-supplied), and the hardcoded budget of 8 carries the "deliberately not `dynamichashmax`" note. #6 MED the WIRE arm of encode_high skipped the encodable_symbols guard; `encodable` is empty for a has_no_code() function, so class="local" + symref against a <localdb> never written is the HighLocal.decode hard-throw. Wire arm now takes the same gate (falls to class="other"). #7 LOW Funcdata::clear() left kuna_wire_symbols / kuna_wire_symbol_for_high behind — HighVariableId-keyed maps outliving the arena that issued the ids. #8 LOW declaration tokens carried `varref`; upstream emitVarDecl pushes an explicitly NULL Varnode, and the omission is load-bearing (ClangVariableToken.getHighVariable returns inst.getHigh() from inside its `inst != null` block and never reaches the parent-decl fallback). Dropped; the create index remains the symref fallback. #9 LOW slot skew: `to_pieces` compacts out params with no dtype while param_storage carried absolute rp.index. Both now use the compacted basis. #10 LOW live rig: `len(before) >= 2` hard-failed on a one-local function (now >= 1, with a NOTE at 1), and the param rename target + its recorded old name now both come from the post-commit result. Doc correction (reviewer-verified): checkFullCommit inspects the parameter count, each categoryIndex and each storage — never the model name. The C6 prose in docs/spec/00-overview.md claimed otherwise; corrected to "the storage echo is the load-bearing half". Spec prose also gains the &symbol identity record, the vardecl encodable filter, and the dynRecommend placement divergence; ghidra-integration.md's deferred list is re-cut. Gates: make test 675/675 PARITY OK; make test-stages 484/484 PARITY OK; make rust-test green; make check-spec OK; make test-ghidra green WITH the breadth test proven to have run (11 sim tests, 6/6 breadth targets at vardecl_unresolved=0). C text byte-identical — c_lines 283/39/92 and every other faillog pin unchanged. No baseline re-pins, no options, no DIV rows. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AfGYKwUWvPYYj1Aw7tcLhC --------- Co-authored-by: Claude Fable 5 <[email protected]>
mahaloz
added a commit
that referenced
this pull request
Aug 27, 2026
…ymbol reports the size it actually touches A top-level array-typed symbol never entered the partial-symbol walk. Upstream `PrintC::pushSymbolDetail` (printlanguage.cc:256-258) routes every partial cover of a mapped Symbol through `pushPartialSymbol` and lets that walk's per-type arms choose the token; the port routed STRUCT and UNION in but split ARRAY off into a dedicated branch (printc.rs:7241) that computes `index = symboloff / elementAlignSize` and emits `name[index]` WITHOUT reading the access size. So an 8-byte write at offset 0 of an `undefined1[16]` rendered `v1[0] = a0` -- a statement that names one `char` and therefore claims a one-byte store -- and at offset 8, `v1[8] = 0`, the ninth byte. That is wrong output, not a style preference. The correct machinery was already ported and already worked; it was simply unreachable for a plain array. `push_partial_symbol_ir`'s TYPE_ARRAY arm (printc.rs:6620) carries upstream's `TypeArray::getSubEntry` guard (`noff + sz <= elsize`) and on failure falls to `PartialEntry::Unnamed(off, sz)` -> `printlanguage::unnamed_field` -> `._0_8_`. The fix admits plain TYPE_ARRAY to the routing gate. Re-routing rather than a size guard on the standalone branch: re-routing keeps `arr[3]` for a genuine in-element access through the walk's own arm and keeps descending afterwards (an array of unions still resolves to `arr[3].ffield`). Unflagged. Blast radius measured first, over 14,080 functions in 12 binaries: 308 functions / 4,953 lines change and every one is accounted for -- 4,937 are a subscript that spanned elements becoming the sized member, 13 are a within-element truncation gaining the explicit cast the walk's finalcast arm emits, 3 are a bare array name becoming the piece it actually is. ZERO genuine in-element renders move. No judgment call in the set, so no option; and because it restores upstream's own rendering it is a Convergences row in docs/history.md, not a DIV row. NOT fixed: `return v1 << 0x40;`. Shifting the whole container is upstream-faithful and still not compilable C -- the scout's invalid-C detector counts exactly the same functions before and after. This fixes the store size, not the container. The two follow-ups are recorded in the rewritten docs/features/arraysubfield/proposal.md: a scalar 16-byte integer type is blocked on `kuna_ctypes.rs::integer_spelling` having no 16-byte entry, and the mid-end half turned out to be a RuleDivOpt coverage gap, filed as #343. Four existing stage assertions moved and were re-recorded, all of them pins on the defective spelling (ghdec-returncopysplit #1/#5/#6, kuna-retinputhalf #2, kuna-rustabi #5). kuna-rustabi is the clearest witness: one function whose 7- and 4-byte writes become `v2._1_7_` / `v2._8_4_` while its one-byte discriminant write stays `v2[0]`. Supersedes the wideintrender proposal (PR #288), rescoped to its Option A. Corpus file count 215 -> 216; docs/baseline-stages.json re-recorded (546 keys). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011KpG7qK6BDFZyPnyo4r1c1
mahaloz
added a commit
that referenced
this pull request
Aug 27, 2026
…ymbol reports the size it actually touches A top-level array-typed symbol never entered the partial-symbol walk. Upstream `PrintC::pushSymbolDetail` (printlanguage.cc:256-258) routes every partial cover of a mapped Symbol through `pushPartialSymbol` and lets that walk's per-type arms choose the token; the port routed STRUCT and UNION in but split ARRAY off into a dedicated branch (printc.rs:7241) that computes `index = symboloff / elementAlignSize` and emits `name[index]` WITHOUT reading the access size. So an 8-byte write at offset 0 of an `undefined1[16]` rendered `v1[0] = a0` -- a statement that names one `char` and therefore claims a one-byte store -- and at offset 8, `v1[8] = 0`, the ninth byte. That is wrong output, not a style preference. The correct machinery was already ported and already worked; it was simply unreachable for a plain array. `push_partial_symbol_ir`'s TYPE_ARRAY arm (printc.rs:6620) carries upstream's `TypeArray::getSubEntry` guard (`noff + sz <= elsize`) and on failure falls to `PartialEntry::Unnamed(off, sz)` -> `printlanguage::unnamed_field` -> `._0_8_`. The fix admits plain TYPE_ARRAY to the routing gate. Re-routing rather than a size guard on the standalone branch: re-routing keeps `arr[3]` for a genuine in-element access through the walk's own arm and keeps descending afterwards (an array of unions still resolves to `arr[3].ffield`). Unflagged. Blast radius measured first, over 14,080 functions in 12 binaries: 308 functions / 4,953 lines change and every one is accounted for -- 4,937 are a subscript that spanned elements becoming the sized member, 13 are a within-element truncation gaining the explicit cast the walk's finalcast arm emits, 3 are a bare array name becoming the piece it actually is. ZERO genuine in-element renders move. No judgment call in the set, so no option; and because it restores upstream's own rendering it is a Convergences row in docs/history.md, not a DIV row. NOT fixed: `return v1 << 0x40;`. Shifting the whole container is upstream-faithful and still not compilable C -- the scout's invalid-C detector counts exactly the same functions before and after. This fixes the store size, not the container. The two follow-ups are recorded in the rewritten docs/features/arraysubfield/proposal.md: a scalar 16-byte integer type is blocked on `kuna_ctypes.rs::integer_spelling` having no 16-byte entry, and the mid-end half turned out to be a RuleDivOpt coverage gap, filed as #343. Four existing stage assertions and two kuna-console integration-test pins moved, all of them pins on the defective spelling (ghdec-returncopysplit #1/#5/#6, kuna-retinputhalf #2, kuna-rustabi #5, verify_return_uncomputed, verify_rustabi_pair). verify_return_uncomputed also carries a min=0 arm that the repair would have made VACUOUS rather than failing -- `!contains("[8] =")` no longer describes the shape it was written to reject -- so it was widened to reject both spellings. kuna-rustabi is the clearest witness of what the fix discriminates: one function whose 7- and 4-byte writes become `v2._1_7_` / `v2._8_4_` while its one-byte discriminant write stays `v2[0]`. Supersedes the wideintrender proposal (PR #288), rescoped to its Option A. Corpus file count 215 -> 216; docs/baseline-stages.json re-recorded (546 keys). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011KpG7qK6BDFZyPnyo4r1c1
mahaloz
added a commit
that referenced
this pull request
Sep 27, 2026
…-record the stages baseline 241 settables (jumptablemax + castwiden), 348 stage files; baseline-stages 1410 -> 1424 (the 14 kuna-castwiden keys). charbyte #3 and CNORM-TRUTHY #5 return to main's form: both were 4-byte destination widenings, which castwiden no longer touches. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01V6bguCkPS65cu9ejj1fbpy
mahaloz
added a commit
to phix33/kuna
that referenced
this pull request
Sep 30, 2026
…call result
An ARM wrapper that calls and returns (`push {r4,lr}; bl provider;
pop {r4,pc}`) stayed `void` in decompile-all, while the same wrapper on
x86-64 (`call provider; ret`) already gets `return provider(a0);` from
passthrough's tail-return rule. The ARM compiler specs inject the mode
switch of every `bx lr` / `pop {...,pc}` as an incidental `r0 = r0`
(MIPS: `v0 = v0` at `jr ra`), and the rule's "the function never touches
the return register" test counted it.
- The tail-return rule no longer counts an injected COPY of a register
onto itself, and returns_tail_result follows the RETURN's value back
through it to the call's result.
- A returned register the body touches (if only through that no-op)
keeps its call-site argument trials scored as with the option off, so
`bl g; bl f; pop {r4,pc}` stays `return f(g(a0))`.
- The argument side is unchanged.
This replaces the opt-in `wrapperreturn` option and its whole-program
caller ledger: main already handled the argument side (Noelo-Lab#764), the return
side needed no caller evidence on x86-64, and with the option on
`mov r0,Noelo-Lab#5; bl inc; pop {r4,pc}` printed `return inc();`. The
docs/features/wrapperreturn fixtures and the stage test that only pinned
the no-evidence case are removed; the stage harness states no callee
prototype, so the positive witness is the kuna-cli test, as for the
other passthrough fixes.
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
Sep 30, 2026
… to keeps printing as the global A load the binary makes of a global after storing a computed value to it is left on the global while the value is read sign-sensitively; otherwise the value and its stores are marked and Merge joins them with the global as before. Fixtures gain w_realias/w_rephi/w_reboth/w_recopy (store, pointer store, load); stage assertions #17-#21, and #5/#6/#9 follow the loads the -O0 binary makes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011shDTp2k5iNyyj9TCjt6vg
mahaloz
added a commit
that referenced
this pull request
Oct 1, 2026
… to keeps printing as the global A load the binary makes of a global after storing a computed value to it is left on the global while the value is read sign-sensitively; otherwise the value and its stores are marked and Merge joins them with the global as before. Fixtures gain w_realias/w_rephi/w_reboth/w_recopy (store, pointer store, load); stage assertions #17-#21, and #5/#6/#9 follow the loads the -O0 binary makes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011shDTp2k5iNyyj9TCjt6vg
mahaloz
added a commit
that referenced
this pull request
Oct 2, 2026
… to keeps printing as the global A load the binary makes of a global after storing a computed value to it is left on the global while the value is read sign-sensitively; otherwise the value and its stores are marked and Merge joins them with the global as before. Fixtures gain w_realias/w_rephi/w_reboth/w_recopy (store, pointer store, load); stage assertions #17-#21, and #5/#6/#9 follow the loads the -O0 binary makes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011shDTp2k5iNyyj9TCjt6vg
mahaloz
added a commit
that referenced
this pull request
Oct 2, 2026
… to keeps printing as the global A load the binary makes of a global after storing a computed value to it is left on the global while the value is read sign-sensitively; otherwise the value and its stores are marked and Merge joins them with the global as before. Fixtures gain w_realias/w_rephi/w_reboth/w_recopy (store, pointer store, load); stage assertions #17-#21, and #5/#6/#9 follow the loads the -O0 binary makes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011shDTp2k5iNyyj9TCjt6vg
mahaloz
added a commit
that referenced
this pull request
Oct 2, 2026
… to keeps printing as the global A load the binary makes of a global after storing a computed value to it is left on the global while the value is read sign-sensitively; otherwise the value and its stores are marked and Merge joins them with the global as before. Fixtures gain w_realias/w_rephi/w_reboth/w_recopy (store, pointer store, load); stage assertions #17-#21, and #5/#6/#9 follow the loads the -O0 binary makes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011shDTp2k5iNyyj9TCjt6vg
mahaloz
added a commit
that referenced
this pull request
Oct 3, 2026
…es its return value (#877) A function that tail-calls a function with no parameters is printed `void`, although the same output prints the callee returning a value. On x86-64 the same happens when the function used `rax` before its tail call. ```c // pr827.c int g; long G[2]; __attribute__((noinline)) int getv(void) { return g * 3; } __attribute__((noinline)) long getk(long x) { return x * 7 + G[1]; } int f(void) { return getv(); } // jmp getv long sum2(long *p) { return getk(p[0] + p[1]); } // mov (%rdi),%rax; add 8(%rdi),%rax; mov %rax,%rdi; jmp getk ``` ``` $ gcc -O2 -c pr827.c -o pr827.o && kuna decompile-all pr827.o ... void f(void) { getv(); // tail-call } void sum2(struct_0 *a0) { getk(a0->field_0x0 + a0->field_0x8); // tail-call } ``` With this change they print `int f(void) { return getv(); }` and `long sum2(...) { ... return getk(v1 + v2); }`. The `f` case also prints `void` on ARM, AArch64, PowerPC and MIPS builds, and is fixed there too. ## Fix - `protoorder` declined to state anything for a function with no parameters. It now states that function's return value. An empty list is not an arity claim, so the only reader is `passthrough`'s tail-call rule. `argclobber` still declines an empty list. - `passthrough` gave a function its tail call's result only if the function never touched the return register. A register that carries no argument (x86 `eax`/`rax`, i386 `eax`, MIPS `v0`) may now be written before the call, since the call overwrites it. Nothing may read or write it between the call and the RETURN. The RETURN's `eax` is followed through the low SUBPIECE that heritage inserts when the function wrote all of `rax`. - Argument registers keep the old rule. On ARM, `mov r0,#5; b g` is as often a `void` function calling `g(5)` as an `int` one returning it: tried on ARM firmware, DWARF confirmed 31 of 97 such returns. Not fixed here: a tail call to a declared libc function (`return strlen(s);`) still prints `void` unless a caller reads the result. Taking those returns was DWARF-confirmed for only 43 of 54, because `void` wrappers ending in `putc` or `clock_gettime` are common. A callee whose own return type is recovered wrongly passes that type to its tail callers, as it already did for callees with parameters (#873, and the MIPS `$v1` read of #878). ## Tests - `kuna-cli/tests/tail_call_returns.rs` builds x86-64, ARM and AArch64 objects. A tail call to a callee with no parameters, and x86-64 wrappers that write `rax` before the call, print `void` on main and return the callee's result now. ARM `mov r0,#5; b getk` stays `void`. - `tests/cli/protoorder-cycles-types-the-callers-of-a-recursive-function.json` no longer pins its -O0 callers as `void`. They load through `rax` before their last call and now return its result. - Main vs head `decompile-all` on 24 debug-stripped decbench binaries (x86-64 O0/O2/O2-noinline, ARM firmware): 126 functions gain a return (DWARF: 97 value, 4 `void`, 25 no entry). Two O0 wrappers widen from `unsigned int` to their callee's `unsigned long`, and two `main`s lose a cast. Nothing else changes. - Speed, interleaved min of 11, main vs head `decompile-all`: coreutils `date` -0.9%, gzip -2.1%, nuttx -2.8%, O0 `tr` -4.9% (noise; no slowdown). Fixes #827 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_012UUBmGqZTcD5N8LxpVsiQt
mahaloz
added a commit
that referenced
this pull request
Oct 7, 2026
New keys: kuna-indexedstoreguard, kuna-zeroloopfield, the renamed STACKGUARD-TAILCALL #3 and indirectonly-escape #1-#5 (pass 2 of that test now asserts the call-crossing refusal for walk and the remaining counterexample walk2). 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 12, 2026
…ment (#1044) `--max-fn-seconds` cannot stop a function that hands the addresses of many stack locals to many calls: it runs far past the budget and its memory keeps growing until it finishes or the system kills it. This 45 KB function asks for 1 second and gets 13: ```c // big.c -- clang -O0 -fno-pic -no-pie -nostdlib -Wl,-e,big -o big big.c struct S { int a; long b; char c[24]; }; __attribute__((noinline)) int cb(void *p) { return *(int *)p; } __attribute__((noinline)) int reg(const char *n, void *p, int i, int (*f)(void *)) { return f(p) + i + *n; } #define L(i) { struct S s; s.a = (i); s.b = r; r += reg("n", &s, (i), cb); } #define L10(i) L(i##0) L(i##1) L(i##2) L(i##3) L(i##4) L(i##5) L(i##6) L(i##7) L(i##8) L(i##9) #define L100(i) L10(i##0) L10(i##1) L10(i##2) L10(i##3) L10(i##4) L10(i##5) L10(i##6) L10(i##7) L10(i##8) L10(i##9) int big(void) { int r = 0; L100(1) L100(2) L100(3) L100(4) L100(5) L100(6) L100(7) return r; } ``` ``` $ /usr/bin/time -f '%e s, %M KB max RSS' kuna decompile-all big --functions big --json --max-fn-seconds 1 "error": "per-function decompile budget exceeded (1 s)" 13.13 s, 2672244 KB max RSS ``` The same shape at 290 KB (5,000 locals) ignores a 10 s budget and reaches 8 GB in 36 s, which matches the growth in #1034. - Heritage guards every stack range at every call, as upstream does, so this function gets one INDIRECT per (local, call) pair, about a million here. That placement loop had no deadline probe; it now checks the deadline before each range. - A pass whose deadline passed during placement returns before renaming, and a pass panic after the deadline reports the budget error, not the panic text. - A function that finishes inside its budget is unchanged: the probes only act once the deadline has passed. After: 1.37 s, 389 MB for the example; 10.8 s and 775 MB for the 290 KB function with a 10 s budget. Tests: `watchdog_stops_heritage_guard_placement` runs the example (checked in as `tests/hang-repro/escaped_locals`) with a 1 s budget and fails without the fix (15 s against a 10 s bound). Speed (decompile-all of gzip, kmod, grep and ls, 11 interleaved runs): +1.7% on the min-sum with flat medians. That is within noise: the new probe runs 26,518 times over all of `ls`, which is well under a millisecond. Part of #1034 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015sdZpNU5odw5dVyaxeSvvz
This was referenced Nov 13, 2026
mahaloz
added a commit
to borancar/kuna
that referenced
this pull request
Nov 16, 2026
Marking the cookie trial no-use while the trials are scored took real arguments with it: the cookie was the active trial fillinMap fills the holes below up to, so a push the upstream test refused on its own was lost (736cb sub_408340 lost `-1`), a pushed argument the stack model maps onto the cookie's slot made every argument after it no-use (win32_remote32 sub_44ce50 lost 10 of snprintf's 11), and the frame slots above the cookie were scored freshly and became arguments. The trials are now scored as before. Once no call scores trials, each call loses its lowest stack argument holding the cookie and every stack argument above it, so a call only ever loses frame slots. The value must not be copied in from another stack slot, the function must store to fs:[0], and an argument the direct callee reads or pops is kept. The fixture gains three cookie-shaped real arguments (STACKCOOKIE Noelo-Lab#5-Noelo-Lab#9). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKQeLQDThvbHGNoGw8h
This was referenced Nov 19, 2026
Merged
mahaloz
added a commit
that referenced
this pull request
Nov 22, 2026
Indexed stack-pointer discovery runs once, on the stack space's first
heritage pass, and stopped where a stack-pointer value was written to a
frame slot: the slot's reads are not linked to the write until that pass
renames the space. gcc -O0 keeps `p = &st[0]` in a local and reloads it for
each p[i]; Tigress pushes &locals[k] on its virtual stack for every access.
The LOAD through the reloaded pointer got no guard, a slot written directly
and read only through it had no reader, and ActionDeadCode deleted the
store, then redundbranch the branch around it. Tigress script_0_57 lost
`if (...) { swap halves of state[1]; state[1] |= (state[4] & 15) << 3; }`
before its `state[local1]` loop; native f_spill lost `if (a > 5) st[1] |= 0x78`.
Discovery now continues from the unlinked reads of a slot a path value was
spilled to and guards the LOADs it reaches (LoadGuard::through_spill);
STOREs stay with the rerun after renaming, as upstream. In the pass that
found it, an unbounded spill guard forces writes only below the lowest
pointer-spill slot above its base, so the spilled pointers themselves are
not kept as variables (dupptr #3/#5); later passes force the full window.
Tests: tests/stages/kuna-spillptr-loadguard.xml (native, one pass);
kuna-pushan-interp.xml #11/#12 on a new Tigress-style tg_indexed in the
pushan_interp_x86_64 fixture (both fail before, pass after). Stage
baseline re-recorded: 5032 -> 5037 passing keys, the five new assertions.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0179iMKQR2hseBprKvbvZRUv
mahaloz
added a commit
to phix33/kuna
that referenced
this pull request
Nov 23, 2026
…the register-piece naming covered sprint_status returns int, and with the call's int no longer widened to all of rax its returned length is an int in eax, not a char * in rax. The stable_local_names test expected the old rax local, so the workspace suite failed; it now expects the int in eax, and both directives are still rejected in either order. kuna-regpiece.xml lost its check that a register piece is declared as a local: the piece no longer appears once the return narrows. A second pass declares sh_openpipe to return int8, which RulePiecePathology leaves alone, and pins the declared local there (Noelo-Lab#4, Noelo-Lab#5). Spec 03 notes the mixed-width case: when another path returns the whole register the return keeps its width and the call's path is zero-extended. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
mahaloz
added a commit
to thotypous/kuna
that referenced
this pull request
Nov 26, 2026
…ters The stack-base guard skipped the function-entry exception that the general word-address rule has: a CP1600 function selecting helper or helper2 into R6 printed v1 = (char *)0x1040 instead of v1 = helper. Both guards now share lacks_word_address_use, which accepts an exact function entry under the function-entry escape's two readings. The selection cases in the stage now run with returndup off. With the return duplicated, each branch returns its constant directly and never passes through R6, so WORD-INDEX Noelo-Lab#5 and Noelo-Lab#6 already passed before the fix. WORD-INDEX Noelo-Lab#7 pins the selected function entries. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
thotypous
pushed a commit
to thotypous/kuna
that referenced
this pull request
Nov 26, 2026
…ters The stack-base guard skipped the function-entry exception that the general word-address rule has: a CP1600 function selecting helper or helper2 into R6 printed v1 = (char *)0x1040 instead of v1 = helper. Both guards now share lacks_word_address_use, which accepts an exact function entry under the function-entry escape's two readings. The selection cases in the stage now run with returndup off. With the return duplicated, each branch returns its constant directly and never passes through R6, so WORD-INDEX Noelo-Lab#5 and Noelo-Lab#6 already passed before the fix. WORD-INDEX Noelo-Lab#7 pins the selected function entries. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
mahaloz
pushed a commit
that referenced
this pull request
Nov 26, 2026
…use (#1996) In a word-addressed space, the pointer type inferred for the stack-base register (the cspec's stack pointer, CP1600 R6) no longer qualifies a constant COPYed into that register for global-address recovery by itself. When neither the constant nor the register is type-locked, the constant needs the same address-use evidence the general word-address rule asks for: a LOAD or STORE through it in that space, or a pointer type naming the space. A CP1600 function that selects 0x65a7 or 0x65ad into R6 and returns it as an integer now prints both numbers instead of `&first` / `&second`. A value held in R6 and stored through keeps its names, and so does an exact function entry selected into R6: both guards now share lacks_word_address_use, which keeps the function-entry exception. Byte-addressed spaces are unchanged. Stage kuna-word-index-scalar.xml gains WORD-INDEX #5-#7 (run with returndup off, so the value passes through R6), and spec 09 describes the rule. 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.
No description provided.