Repository navigation
[AUTOMATED] feat(modes): the four ARM entry-discovery options join the aggressive preset (DIV-93) - #345
Merged
Conversation
… preset (DIV-90) cortexmvectors (#248), ptrentry (#255), tailcallentry (#259) and poolentry (#278) all shipped default-OFF and sat on the UNEVALUATED list in modes.rs, so they were absent from AGGRESSIVE_OVERRIDES. `auto` resolves to `aggressive` under 500 KiB, and the preset is what the whole-binary surfaces actually run, so all four were INERT on every default path -- the DIV-64 itaniumrtti trap, four times over. The default path's stripped-ARM entry recall had not moved since they merged. They are flipped jointly because they compose, which is exactly what the UNEVALUATED comment demanded before any flip. Measured over the 110 stripped non-x86-64 decbench twins against their unstripped twins' symbol tables (50,724 ground-truth function starts), --mode aggressive: arm entries exact midbody recall added added_exact lost_exact base 55006 44957 8333 88.63% - - - cortexm 55142 45093 8333 88.90% 136 136 0 ptr 56594 46522 8333 91.72% 1588 1565 0 tail 55655 45602 8337 89.90% 649 645 0 pool 53956 45122 7116 88.96% 167 165 0 all4 56188 47330 7117 93.31% 2402 2373 0 Recall and precision improve together: +2,373 real entries (98.8% of everything added is a real function start) while mid-body false entries FALL 8,333 -> 7,117. No ground-truth entry is lost by any arm -- poolentry's 1,217 removals contain zero ground-truth addresses. 0 of 110 binaries lose recall. Restricted to the 105 binaries `auto` actually sends to `aggressive` (< 500 KiB), the default-path number is 90.92% -> 96.06%. The 5 images at/over the threshold resolve to `reliable` and are disclosed in the DIV row rather than papered over. Non-ARM inertness is measured: identical entry sets over 90 x86-64 twins and the 12 i386 PE images in the ARM corpus, byte-identical emitted C over 8 x86-64 binaries. Speed, interleaved min-of-4: decompile-all cf2.elf -5.8% (a speedup), nuttx +3.5%, x86-64 controls at noise; discovery-only `kuna functions` +6.2%, which is more work for more output on the one surface that only does discovery. The 0/675 ablation is proven, not asserted: a throwaway build with all four forced ON as engine defaults -- strictly stronger than preset membership, which the XML harness never applies -- still reports 675/675 and 538/538 PARITY OK. Also lands PR #239's two doc corrections, repointed at the shipped feature docs rather than at its unshipped-proposal directory: the recall-measurement.md mechanism/noise correction and the missing-ghidra-analyses.md OperandReferenceAnalyzer row (its "function creation is subsumed by entry-disc" claim is what ptrentry disproved). [AUTOMATED] Generated by Claude Code. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011KpG7qK6BDFZyPnyo4r1c1
features-round4.md Rank 6 was a filed, still-open recommendation to flip
`tailcallentry` into the preset ("aggressive does not carry it"); DIV-90 does
exactly that, so it is marked SHIPPED with the sweep it asked for. features.md
still called step 3 "in flight" and did not know about step 5 (`poolentry`, #278).
[AUTOMATED] Generated by Claude Code.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_011KpG7qK6BDFZyPnyo4r1c1
cortexmvectors/ptrentry/tailcallentry each early-return on `object::Architecture::Arm`; poolentry does not, and is ARM-only in EFFECT because it keys on PC-relative literal pools. The measured inertness is the same either way (identical entry sets on 90 x86-64 twins and 12 i386 PE images), but "all four are ARM-gated" overstated the mechanism for one of them. [AUTOMATED] Generated by Claude Code. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011KpG7qK6BDFZyPnyo4r1c1
Dropping each option from the combination loses 27 / 1427 / 645 / 136 ground-truth entries respectively, and dropping poolentry is the only one that also raises mid-body false entries (7117 -> 8337). No option is redundant given the others. [AUTOMATED] Generated by Claude Code. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011KpG7qK6BDFZyPnyo4r1c1
[AUTOMATED] DIV-90/91/92 were claimed by #341/#342/#344 while this branch was in flight; the row and every reference move to DIV-93. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011KpG7qK6BDFZyPnyo4r1c1
mahaloz
force-pushed
the
feat/armentrypreset
branch
from
August 27, 2026 20:05
1262815 to
e93c346
Compare
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.
The defect
cortexmvectors(#248),ptrentry(#255),tailcallentry(#259) andpoolentry(#278) allshipped default-OFF and sat on the
UNEVALUATEDlist inp0_knowledge/modes.rs, which exempted them fromAGGRESSIVE_OVERRIDES.autoresolves toaggressiveunder 500 KiB, and the preset is whatdecompile-all,functions,decompile-project, the WASM front-end and the benchmark actually run — so all four were inerton every default path.
decompile_all.rsinjects onlylisting+funcstart_patterns+aifon non-x86-64, so the only way to reach them was an explicit
--option.This is the DIV-64
itaniumrttitrap, four times over: the measurable consequence is that thedefault path's stripped-ARM entry recall had not moved at all since the four passes merged.
The in-tree comment set the bar and this PR meets it verbatim — "Their preset membership is one
joint evaluation, not four." They are flipped jointly because they compose (
poolentry'sacceptance numbers were themselves measured on top of the other three).
Evidence
Corpus: the 110 stripped non-x86-64 decbench twins, scored against their unstripped twins'
symbol tables (
STT_FUNC, Thumb bit masked) — 50,724 ground-truth function starts.--mode aggressive, one frozen release binary for every arm.cortexmvectorsptrentrytailcallentrypoolentryRecall and precision improve together. +2,373 real entries and mid-body false entries
fall 8,333 → 7,117. This is not a recall-for-precision trade.
lost_exact(ground-truth entries dropped) is the metric this decision hinges on, andscout-299's harness did not compute it —
poolentryremoves entries by design, so "never loses areal entry" has to be proven per-address rather than inferred from a net total. It is 0 in every
arm:
poolentry's 1,217 removals contain zero ground-truth addresses.O2-noinline/u-boot) gains mid-body entries, +2.u-boot +173, chibios +162, nuttx +147, riot-os +43, freertos +22.
Both directions: leave-one-out from the combination
The table above adds each option to today's default. This one removes each from the
combination (reference = all four on) — the direction that actually answers "is any of these
redundant given the others?"
cortexmvectorsoffptrentryofftailcallentryoffpoolentryoffNone is redundant.
poolentryis also the only one whose removal raises mid-body falseentries (7,117 → 8,337) — it carries the precision half of the pair.
cortexmvectorsis thesmallest contributor in context (+27, versus +136 measured alone, because the other three
independently reach most of what it unlocks), but it is never negative and costs nothing.
Non-ARM inertness — measured, not assumed
decompile-all --jsonemitted C, 8 x86-64 binariesCollateral on ARM (the point of the change)
decompile-allfunction counts: msc.elf 59 → 70, ch.elf 344 → 398, nuttx 727 → 792,riot-os hello-world 151 → 171, betaflight 5013 → 5088, cf2.elf 1966 → 1973.
The new bodies are real. On msc.elf all 11 new entries are DWARF function starts
(
ramdisk_write,usbd_register_control_callback,msc_control_request,dwc_ep_nak_set, …);ch.elf 57/57, and its 3 removals are not ground truth. Sample, absent from the off arm:
The two constants are the DWC-OTG
DOEPCTLCNAK (bit 26) and SNAK (bit 27) flags, whichis precisely what a
dwc_ep_nak_set(dev, ep, nak)routine should write.Speed — interleaved, min-of-4, on a shared box (load 10–27)
decompile-allcf2.elf (ARM)decompile-allnuttx (ARM)decompile-allgrep (x86-64)functionslibselinux.so.1 (x86-64)functionscf2.elf / betaflight (ARM)Reported rather than buried:
kuna functionsdoes discovery and nothing else, so it is the worstcase by construction, and the extra time buys extra output (+7 and +75 functions). End to end,
where the surface actually costs something, the ARM number is a speedup or inside budget.
The 0/675 ablation — proven, not asserted
DIV-61/DIV-65 record that the XML
<binaryimage>bootstrap never runs the analyzer tier, so thisshould be structurally free. Rather than assert it, a throwaway build forced all four ON as
engine defaults — strictly stronger than preset membership, which the XML harness never
applies — and the corpus was re-run: 675/675 PARITY OK and 538/538 PARITY OK.
Disclosed caveat: the 500 KiB
autothresholdautoonly picksaggressivebelow 500 KiB. On the 105 corpus binaries it actually reaches,the default-path number is better than the aggregate: 90.92% → 96.06% (+1,677), mid-body
4,079 → 3,279. The 5 images at/over the threshold (2× u-boot, 3× betaflight) resolve to
reliableand get neither these four noraifstrict, leaving +696 recoverable entries there.--mode aggressivestill delivers them, and the Ghidra front-end applies the presetunconditionally, so it is unaffected. Raising or size-tiering that boundary is a separate DIV.
Also in this PR: PR #239's two doc corrections
Cherry-picked onto main and repointed at the shipped feature docs rather than at #239's
arm-entry-granularity/directory, whose prose argues throughout that the fixes are unshipped:docs/decbench/recall-measurement.md— the mechanism correction (it is not absorption:1,896 of 2,941 missed addresses sit past the end of the nearest kuna function and exactly 3 are
inside a body) and the noise correction (the three
bx lrhandler stubs are real and everyrival recovers them).
docs/missing-ghidra-analyses.md§6 — theOperandReferenceAnalyzerrow. Its "functioncreation → subsumed by entry-disc" claim is exactly what
ptrentrydisproved; the row now reads🟡 with the shipped option named.
Do not merge #239's bundle as-is. Per the scout verdict, #239 should be closed with a comment
naming #248/#255/#259/#278 and this PR. Only its step 4 (TBB/TBH switch resolution) survives, and
it needs re-scoping from scratch — its estimate predates all four merged discovery passes.
Gates
make testdatatests: 675/675 assertions passed→ PARITY OK (docs/baseline.jsonuntouched)make test-stagesdatatests: 538/538 assertions passed→ PARITY OKmake rust-testcargo test --workspace --no-fail-fastexit 0, 323 test binaries, 4834 passed, 0 failed, 0 ignoredmake check-speccheck-spec OKin both lenient and strict modekuna catalog --checkcatalog OK: documents exactly the registered kuna optionsNo new option, so no catalog count moved (119 settables, unchanged). One hard-coded fixture did
move and is re-derived from the failing assertion, not guessed:
kuna-decomp/tests/fixtures/phase_catalog.json(4 lines — the four options'use_whenprose).No
tests/stages/*.xmladded, so no corpus-count or baseline-stages re-record.The regression gate for the flip is the existing invariant test
aggressive_carries_every_default_off_option: with the four removed fromUNEVALUATED, droppingany of them from the preset is now a build failure. A stage XML cannot cover this — the datatest
harness applies no mode at all, which is the same property that makes the 0/675 ablation free.
DIV number: claimed DIV-90 (highest on main is DIV-89). Sibling PRs may claim 90–94; if one
merges first this row and its references in
modes.rs,docs/modes.md,docs/decbench-loop.md,docs/missing-ghidra-analyses.md,docs/decbench/recall-measurement.md,phases.tomlanddocs/options.mdneed renumbering.🤖 Generated with Claude Code
https://claude.ai/code/session_011KpG7qK6BDFZyPnyo4r1c1