Repository navigation
analysis: conclude error(nonzero,...) wrappers no-return — stop decoding cold fall-through (decbench F2, DIV-16) - #126
Merged
Conversation
…ing cold fall-through (decbench F2, DIV-16) The value-conditional slice of Ghidra's discovered-no-return analyzer, folded into the noreturn_propagate consumer. glibc error(int status, ...) / error_at_line(...) call exit(status) and never return when status != 0 (but DO return for status == 0), so error can't be a Known no-return — yet an internal wrapper whose tail is call error(2,...) (GNU pfatal_with_name, every die()-via-error helper) is unconditionally no-return. kuna treated such wrappers as returning and decoded the cold fall-through / next-function bytes as live code at every caller (diff::sip inflated 43->99 LOC, GED 347). Fix: treat a tail call error/error_at_line as terminal iff the call site's first int-arg register (x86-64 SysV EDI/RDI = int status) is a nonzero literal (MOV EDI,0x2); zero (XOR EDI,EDI) or non-constant/unprovable status is rejected (conservative). Emits the existing NoReturnFact -> set_function_no_return; the existing fixpoint propagates to every caller. sip 99->~43 LOC (ghidra's shape), GED 347->0; also closes the ghidra sshd_hostkey_sign / simple_flush_write family. Option noreturn_error, default ON (DIV-16), correctness-fix, REMOVES CODE. Gated on the Listing (default-off) AND noreturn_propagate — a no-op otherwise — so every parity gate is byte-identical (real-ELF Listing path only). Scope: the error() slice only; transitive/looping internal wrappers (sshfatal, archive_write_error) are a follow-up. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_018DV2MXxQAAWK7xLPBmsq9J
…n-error # Conflicts: # decompiler/crates/kuna-base/src/xml.rs # decompiler/crates/kuna-decomp/src/p0_knowledge/kuna_stages/tests.rs # decompiler/crates/kuna-decomp/tests/catalog_bytecompat.rs # docs/baseline-stages.json # tests/stages/kuna-catalog.xml
…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
…or the 71st option Missed in the merge resolution — a non-conflicting assert that git auto-took from main. 71 options => 70 trailing commas (last row has none). 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
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.
decbench campaign F2 — the single highest-leverage remaining lever: it closes cases across both the angr-beats-kuna AND ghidra-beats-kuna pools.
Mechanism
glibc
error(int status, ...)/error_at_line(...)callexit(status)and never return whenstatus != 0— but DO return forstatus == 0— soerrorcan't be a Known no-return. Yet an internal wrapper whose tail iscall error(2,...)(GNUpfatal_with_name, and everydie()-via-errorhelper) is unconditionally no-return. kuna treated such wrappers as returning, so at every caller it decoded the cold fall-through / next-function bytes as live code (diffutilsdiff::sipinflated 43→99 LOC, GED 347).Fix: treat a tail
call error/error_at_lineas terminal iff the call site's first int-arg register (x86-64 SysVEDI/RDI= theint status) is a nonzero literal (MOV EDI,0x2). A zero status (XOR EDI,EDI) or any non-constant/unprovable status is rejected (conservative — a false positive would drop live caller code). Emits the existingNoReturnFact→ the existingset_function_no_returnseam; the existing fixpoint propagates to every caller, which then truncates at the wrapper call. This is the value-conditional slice of Ghidra's discovered-no-return analyzer, folded into thenoreturn_propagateconsumer.Effect
diff::sip: 99 → ~43 LOC (Ghidra's shape), GED 347 → 0.sshd_hostkey_sign/simple_flush_writefamily (seedocs/decbench/triage-ghidra/).Default & gating
Option
noreturn_error, default ON (DIV-16),change_kind = correctness-fix, REMOVES CODE (the dead fall-through). Gated on the Listing (default-off) ANDnoreturn_propagate— a no-op otherwise — so every parity gate is byte-identical (the real-ELF Listing path only; the console/datatest harness never builds a Listing, sodocs/baseline.jsonis untouched).Scope: the
error()slice only. Transitive custom fatal wrappers (sshfatal) and infinite-loop wrappers (archive_write_error) are a documented follow-up.Gates (verified independently by the coordinator)
make test— 675/675 PARITY OK (byte-identical;docs/baseline.jsonuntouched — Listing-gated)make test-stages— regenerated + PARITY OKmake rust-test— green(The implementing agent was stopped once its implementation was complete; the coordinator added the DIV-16 entry and re-ran all three gates before merge.)
🤖 Generated with Claude Code
https://claude.ai/code/session_018DV2MXxQAAWK7xLPBmsq9J