[AUTOMATED] fix(p2,cli): checker-exceeds-instruction-ceiling — a function past the instruction budget yields a truncated body, not nothing - #422
Merged
Conversation
…tion past the instruction budget yields a truncated body, not nothing Overrunning the 100000-instruction flow budget returned `code: null` and an error naming no remedy, so an agent decompiling a large obfuscated function got nothing and no way to ask for more. The budget already had a truncating policy; it did not truncate. `FlowInfo::process_instruction` planted a `badinstruction` artificial halt at the overrun address and then decoded that instruction anyway (faithful to upstream flow.cc:396), so the next address was queued and the walk carried on to the end of the reachable body with one halt per instruction — an out-of-memory abort on the 1.8M-instruction MBA checker this need came from, at `maxinstruction` 2000 and 5,000,000 alike. The branch now reports no fall-through after planting the halt, registers that halt in `visited` as the instruction at the address so a later branch resolves to it, and marks it a basic-block and instruction start. With a truncation that truncates, the CLI's decompiling surfaces take it (DIV-118); the engine, console and datatest defaults keep upstream's throw. The warning header names both knobs. Closes the round-3 RE-friction need `checker-exceeds-instruction-ceiling`; the acceptance probe is promoted to tests/cli/ against an in-repo fixture. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mahaloz
force-pushed
the
feat/re-checker-exceeds-instruction-ceiling
branch
from
September 5, 2026 22:11
9953b9a to
c5e0845
Compare
mahaloz
added a commit
that referenced
this pull request
Sep 5, 2026
The three needs that shipped in round 3 -- #417, #421, #422 -- had their acceptance probes flip from FAIL to PASS on a freshly built main at 80e965c, but the record on disk still said `status: open`. Anyone reading docs/re-needs/ (or any selector that reads it) would see three closed gaps as dispatchable work. This is the second time this edit has been applied: the first application was made in the main working tree and never committed, and it was lost when that tree was moved between branches. Committing it is the fix. Statuses, `closed_in_round` and `closing_pr` come from .kuna-repipe/rounds/3/acceptance-suite.json (sha 80e965c, 3 closed, 0 regressed) -- no verdict is re-derived here. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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 problem
A function whose flow exceeds kuna's 100000-instruction budget decompiled to
nothing at all, and the error named no way out. Any in-repo fixture reproduces it
once the budget is small enough to reach:
The budget has always had a second policy — truncate instead of throw — and it did
not truncate. It planted an artificial halt at the overrun address and then decoded
that instruction anyway, so the next address was queued and the walk carried on to
the end of the reachable body, now with one halt per instruction:
The budget value does not change that outcome, which is the tell. On the 7 MB MBA
crackme this need came from (crackmes.one
69d6affb110488a3205426e2), whosesub_140001000is one genuine 1,804,480-instruction function, the truncating armdied at a failed 11.5 GB allocation after 38 s at
maxinstruction2000 and at5,000,000 alike.
The fix
FlowInfo::process_instructionreports no fall-through at the budget afterplanting the halt, so the walk stops there. Every address still queued is halted
the same way when it is popped; the decode ends at the budget instead of at the
end of the body.
visitedas the instruction at that address, so abranch arriving there later resolves to it rather than raising "Could not find op
at target address", and it starts a basic block — the lesson [AUTOMATED] fix(p2): funcboundflow's truncation must start a basic block #410 learned for the
funcboundflowtruncation.take it (
errortoomanyinstructions off, DIV-119). An inventory or query load neverfollows flow and does not; the engine, console and datatest defaults are unchanged,
which is why neither parity corpus can move.
sent the reporter through
kuna cataloglooking for an option that was neverthere:
--option maxinstruction Nraises the budget,--option errortoomanyinstructions onmakes the overrun fatal again.The witness now decompiles: 10,164 lines of C,
error: null, 37.3 s and 3.76 GB forthe 100000 instructions the budget allows.
The tests
tests/cli/checker-exceeds-instruction-ceiling.json(the promoted acceptance,restated on a 16 KB in-repo fixture because CI has no dataset) and a two-pass
kuna-cliintegration test:--option errortoomanyinstructions onmust still givecode: nulland the old error.decompile_e2e.rsnow asserts the bounded run emitsless C than the unbounded one — it did not before.
decompile-allover all 156analysis fixtures is byte-identical on both arms.
Gates:
make testPARITY OK 675/675,make test-stagesPARITY OK,make rust-testgreen (5,596 passed / 0 failed),
make check-specOK,make test-cli32/32,kuna catalog --checkOK.🤖 Generated with Claude Code