Skip to content

docs: exhaustive remaining-analyzer backlog (eventually do them all) - #11

Merged
mahaloz merged 1 commit into
analysis-port-noreturnfrom
analysis-port-backlog
Jun 23, 2026
Merged

mahaloz merged 1 commit into
analysis-port-noreturnfrom
analysis-port-backlog

Conversation

@mahaloz

@mahaloz mahaloz commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Adds docs/analysis-port-backlog.md — every one of Ghidra's 142 *Analyzer.java classes that is not yet ported, recorded as actionable future work (the standing intent is to eventually port them all). Generated from an 8-agent deep-read of each remaining cluster, synthesized into one prioritized backlog.

Full accounting reconciles to 142: ~14 ported (Increments 1–17 + the PLT/GOT loader markup) + ~13 engine-inherited (the decompiler already does it) + ~115 backlog.

Tiered so any item can be picked up:

  • Tier A — ELF-relevant gaps (do first): DWARF .debug_line source lines, full .eh_frame CFI / .gcc_except_table LSDA, the full BytePatterns function-start set, operand/scalar reference markup, flow-based no-return (FindNoReturnFunctionsAnalyzer), the thunk/external object model (CreateThunk/ExternalLocation), ExternalSymbolResolver, etc.
  • Tier B — engine-inherited refinements (recorded, incl. roadmap Fix test stages #9 post-typing jump-table re-recovery).
  • Tier C — the 31 per-CPU processor analyzers.
  • Tier D — non-ELF executable formats (Mach-O / PE / COFF / PEF / .NET).
  • Tier E — container / firmware / filesystem formats (Android/iOS/ext4/DTB/…).
  • Tier F — OS / runtime / language subsystems (Go pclntab, Swift, ObjC, FID).
  • Tier G — framework / abstract / non-analyzer infra.

Each row: purpose · why-not-yet · prereqs · port approach · difficulty · ELF-relevance — plus a recommended do-next ordering across the whole set. Cross-linked from analysis-port-log.md.

Note: this stacks on PR #10 (analysis-port-noreturn); GitHub will auto-retarget its base to main once #10 merges. Docs-only — no code, no gate impact.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PoywQpWT2aEJgJiy7oHemD

Add docs/analysis-port-backlog.md — every one of Ghidra's 142 *Analyzer.java classes
that is NOT yet ported, recorded as actionable future work (per the standing intent to
eventually port them all), generated from an 8-agent deep-read of each remaining cluster.

Full accounting reconciles to 142: ~14 ported (Increments 1-17 + PLT/GOT loader markup)
+ ~13 engine-inherited (the decompiler already does it) + ~115 backlog. The backlog is
tiered: A = ELF-relevant gaps (do first: DWARF .debug_line source lines, full .eh_frame
CFI/LSDA, full byte-pattern function starts, operand/reference markup, flow-based
no-return, thunk/external object model, …); B = engine-inherited refinements (recorded,
incl. roadmap #9 post-typing jump-table re-recovery); C = the 31 per-CPU processor
analyzers; D = non-ELF executable formats (Mach-O/PE/COFF/PEF/.NET); E = container/
firmware/filesystem formats; F = OS/runtime/language subsystems (Go pclntab, Swift, ObjC,
FID); G = framework/abstract infra. Each row: purpose / why-not-yet / prereqs / port
approach / difficulty / ELF-relevance, plus a recommended do-next ordering across the
whole set. Cross-linked from analysis-port-log.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01PoywQpWT2aEJgJiy7oHemD
@mahaloz
mahaloz merged commit 5cca3f1 into analysis-port-noreturn Jun 23, 2026
@mahaloz
mahaloz deleted the analysis-port-backlog branch July 29, 2026 08:01
mahaloz added a commit that referenced this pull request Sep 17, 2026
…e SUB41 intrinsic

Review round 2 on boolbyte.  `CastStrategyC::isSubpieceCast` (cast.cc:411-432)
lists the destination metatypes a SUBPIECE may print as a cast and TYPE_BOOL is
not among them, because upstream never puts one there.  Once `boolbyte` does, a
truncation into that byte fell to the functional arm and printed the raw
`SUB41(x,0)` p-code intrinsic -- an undeclared identifier, and the class
`subright` exists to keep out of the emitted C.

`kuna_boolbyte::truncation_prints_as_cast`, consulted from
`printc::subpiece_is_cast`, supplies the missing arm.  It is part of the option,
so `boolbyte off` is byte-for-byte what it was.  Whole-binary counts of the
intrinsic now go DOWN with the option on, never up: 7 -> 0 over the sixteen
sweep binaries (tar -O2 4 -> 1, ls -O2 1 -> 0, du -O0 1 -> 0, find -O0 1 -> 0);
three of those are cases a comparison alone had already made bool without this
rule.

Also in this commit:
- tests/stages/kuna-boolbyte.xml gains `truncjoin` and assertions #11/#12: pass 1
  (off) is the SUB41 the printer emits without the arm, pass 2 (on) is the cast.
- docs/spec/05-types.md replaces the false "the declaration is all that changes;
  the body is untouched" with the measured surface: constant re-rendering,
  truncation re-rendering, and the speculative-merge splits that move a
  declaration count or which variable an expression names.
- the three count ladders in kuna_phases/tests.rs get their missing
  "+1 for `boolbyte`" comment lines.
- plan.md's change_kind corrected to type-inference; record.json's corpus block
  re-measured (100 functions change: 89 declaration-and-literal only, 6
  declaration-count, 1 merge-shape, 4 SUBnn -> cast).

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01MAeimyWm5oSewpeCgAwY29
mahaloz added a commit that referenced this pull request Sep 17, 2026
…ation assertions

Adds boolbyte #11/#12 and the reworded #3, and drops the stray trailing newline
so the file is byte-for-byte what `kuna test --save-baseline` writes (main's copy
has none either).

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01MAeimyWm5oSewpeCgAwY29
mahaloz added a commit that referenced this pull request Sep 18, 2026
A call argument narrower than int that the caller zero-extends kept no
truncation in the printed C, so C's integer promotion handed the callee a
different value than the binary passes (f: sink(a0 * 3) for a movzx'd
16-bit product). When subvariable flow trims a call argument and every
dropped bit is known zero, the trim is recorded on the call, and emission
casts that argument to the unsigned type of its width unless promotion
already zero-extends it or the value provably fits. clang-forwarded narrow
parameters (no zero-extension evidence) stay uncast. C output only; no
option, since it restores a conversion the binary performed.

Tests: tests/stages/kuna-truncarg.xml (12 assertions; #1-#4 and #8 fail on
main, #11/#12 are clang forwarding guards). Round trip over 719 values:
main 309 wrong, this change 0 new wrong under gcc and clang.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
mahaloz added a commit that referenced this pull request Sep 21, 2026
… carry the re-measured sweep

The stage witness path_prefix depended on a constant PTRADD step and now
prints void * in both passes, so it becomes control #11 and the witness is
tar -O0 drop_volume_label_suffix (strlen's declared char * at the base).
Controls #9/#10 are the struct-embedded walks; the pre-fix build fails
exactly #9-#11. Stages baseline re-recorded (1272 -> 1275, charptr rows only).

444-slice sweep with the option on: 1,349 -> 1,349 perfect, aggregate
-0.57, 2 improved, 4 worse (was +4 / +4.93). Spec 05, phases.toml, modes.rs
and the feature bundle say so; the in-flight refine caveat is stated where
the text claimed only a pointer at nothing is refined.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_017ei9zqc7XHgZdMAzrk8jAL
mahaloz added a commit that referenced this pull request Sep 21, 2026
… carry the re-measured sweep

The stage witness path_prefix depended on a constant PTRADD step and now
prints void * in both passes, so it becomes control #11 and the witness is
tar -O0 drop_volume_label_suffix (strlen's declared char * at the base).
Controls #9/#10 are the struct-embedded walks; the pre-fix build fails
exactly #9-#11. Stages baseline re-recorded (1272 -> 1275, charptr rows only).

444-slice sweep with the option on: 1,349 -> 1,349 perfect, aggregate
-0.57, 2 improved, 4 worse (was +4 / +4.93). Spec 05, phases.toml, modes.rs
and the feature bundle say so; the in-flight refine caveat is stated where
the text claimed only a pointer at nothing is refined.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_017ei9zqc7XHgZdMAzrk8jAL
mahaloz added a commit that referenced this pull request Sep 29, 2026
… a loop phi; DWARF corpus hunks; spec residual

kuna-narrowload.xml #9-#11: a declared record reached through a call's result
and a loop's phi keeps its byte read (fail on the previous head, pass on main
and here). Chapter 03 states the type-lock requirement and the measured
declared-record residual (182 AND-form loads in 81 functions on 18 DWARF
builds, the same loads main widened). hunks-dwarf.txt classifies every
changed function on those builds.

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
… a loop phi; DWARF corpus hunks; spec residual

kuna-narrowload.xml #9-#11: a declared record reached through a call's result
and a loop's phi keeps its byte read (fail on the previous head, pass on main
and here). Chapter 03 states the type-lock requirement and the measured
declared-record residual (182 AND-form loads in 81 functions on 18 DWARF
builds, the same loads main widened). hunks-dwarf.txt classifies every
changed function on those builds.

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
… a loop phi; DWARF corpus hunks; spec residual

kuna-narrowload.xml #9-#11: a declared record reached through a call's result
and a loop's phi keeps its byte read (fail on the previous head, pass on main
and here). Chapter 03 states the type-lock requirement and the measured
declared-record residual (182 AND-form loads in 81 functions on 18 DWARF
builds, the same loads main widened). hunks-dwarf.txt classifies every
changed function on those builds.

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
… ^ ~ << 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 Oct 7, 2026
…the catalog fixture

[AUTOMATED] Stages baseline: SYSCALLREGS-MIPS-A3 #11 added, #3 renamed for its
new count, SYSCALLREGS-MIPS #1 renamed; no other key of main's baseline is
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
…the catalog fixture

[AUTOMATED] Stages baseline: SYSCALLREGS-MIPS-A3 #11 added, #3 renamed for its
new count, SYSCALLREGS-MIPS #1 renamed; no other key of main's baseline is
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 31, 2026
Brings in #1301 (x86-16.sla with realCS), #1314 and #1315 (option
gowalkprune). Catalog counts: 344 settables, tiers 122 core / 131
transform / 91 analysis, catalog JSON 343 row separators, KUNA-CATALOG #15
344 rows (350 matches). Stage corpus count 602 (main's 598 plus this PR's
four files); docs/baseline-stages.json re-recorded: 3298 keys, main's 3276
plus the 25 this PR adds, less the 3 it renames.

kuna-x86-16-real-rel16 now pins option segmentize off: its asserts #7 and
#11 read each pushed IP as a store through segment(), which the default
folds into the stack frame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013BBaWRVoTEYHNosYwYRoSE
mahaloz added a commit to borancar/kuna that referenced this pull request Nov 13, 2026
The extent now comes from the walk that proves a callee's pop instead of a
second walker, and it is a proven fact or absent: EBP (and every register)
is unplaced until the callee sets it from ESP, so a callee framed by
__SEH_prolog4 states nothing (every caller of one lost all its stack
arguments: setuptools cli-32.exe sub_40c272's CreateFileA(...) printed as
CreateFileA()); a copy of ESP (`mov esi,esp`) is followed; an argument's
address stored, returned or live at a call, an argument indexed at run time,
an indirect jump or a budget overrun states nothing; a nested call touches
its own known extent, and one to a stack-moving helper with none unplaces it.

The call site's bound widens the extent to what the callee's returns pop and
to what the caller removes after the call (pop ecx / add esp,N, also when
MSVC defers it past calls whose pops are known), so an unread parameter that
was pushed and taken off for the call stays an argument (TAILCALLSAVED Noelo-Lab#4 is
sub_100074(2,1) again). Only a trial starting past the bound is dropped; the
alias test is skipped only within the bytes the callee touches.

The option row is now honest about being a destructive judgement (transform
tier, new-analysis); CALLEEARGS Noelo-Lab#11 no longer pins GetStdHandle() with its
argument missing; new stage cases cover an __SEH_prolog4 callee, an alloca
caller, an EBP-framed callee, va_start and a copy of ESP.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0179iMKQeLQDThvbHGNoGw8h
mahaloz added a commit to borancar/kuna that referenced this pull request Nov 16, 2026
A value shaped like the cookie (a global XORed with the stack or frame
pointer) that the body of an SEH function pushes for a call through a
pointer is a real argument, but the shed took it, and every argument
above it, for the cookie: `lookup2(key ^ esp, 7)` printed as
`lookup2()`, and under an EBP SEH frame with no cookie at all
`lookup(key ^ ebp)` printed as `lookup()`.

The op that stores the cookie into its slot must now be the prologue's:
in the block of a store of a stack address to fs:[0] (the link of the
registration record), before it. A store to fs:[0] that is not a link
(the epilogue's unlink) no longer counts as an SEH frame. The fixture
gains sehkey and sehebp (STACKCOOKIE Noelo-Lab#10, Noelo-Lab#11). STACKCOOKIE Noelo-Lab#7 also
accepts the key XORed with the address of a named local: when the cookie
never becomes the call's argument, its slot is mapped as a local, and
the stack pointer at the push is that local's address.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0179iMKQeLQDThvbHGNoGw8h
mahaloz pushed a commit that referenced this pull request Nov 16, 2026
#1594)

An x86-32 MSVC function with an EH frame pushes the /GS cookie (`mov eax,[___security_cookie]; xor eax,esp; push eax`) below its saved registers. Calls whose stack extent is not stated read that slot as a trailing stack argument, and sometimes the frame slots above it too.
Trials are still scored as before, so the slot still anchors the pushes below it and stays claimed by the call that took it. Once no call in the function is scoring trials, each call drops its lowest stack argument that holds the cookie, along with every stack argument above it. A call only ever loses frame slots.
An argument counts as the cookie only if three things hold. On every path its value is a global XORed with the stack pointer, never copied in from another stack slot, and stored into its slot by the prologue: in the block that links the registration record into fs:[0] (a stack address stored there), before that link. The direct callee neither reads nor pops the slot.
A `key ^ esp` pushed outside an SEH frame, pushed in the body of one, or read by its callee, and a copy read back from the cookie's slot, stay arguments. New stage test kuna-stackcookie (STACKCOOKIE #1-#11) runs on the clean-room fixture stackcookie_pe_i386.exe, whose recipe is in stackcookie_pe_i386.s.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_0179iMKQeLQDThvbHGNoGw8h
mahaloz added a commit that referenced this pull request Nov 18, 2026
Records the five declaredpop stage assertions added for frame_local,
keep_edx and join_push (#7-#11) in docs/baseline-stages.json; every other
entry is the merge of main's and this branch's baselines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0179iMKQeLQDThvbHGNoGw8h
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant