Repository navigation
fix(kuna): recover explicit direct-call destinations - #12106
Merged
Merged
Conversation
morluto
marked this pull request as ready for review
November 18, 2026 23:40
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Nov 18, 2026
Contributor
[Medium impact] The reviewed changes appear safe to merge. SummaryAdds an explicit Kuna recovery path for arm64 Mach-O call destinations outside the procedure inventory, without changing normal lookups or exports.
No superseding fix was found in the available local history. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Explicit call-destination request] --> B[Check target, executable bytes, and exact incoming call]
B -->|Checks pass| C[Create call evidence]
B -->|Checks fail| D[Refuse this request]
C --> E[Run standalone Kuna decompilation]
E -->|Success| F[Return body linked to call evidence]
E -->|Failure or cancellation| G[Keep call evidence with the error]
Reviews (2) · Last reviewed commit: "fix(kuna): preserve call evidence on dec..." · Reviewed by Greptile |
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.
Fixes #8352.
Kuna can report an exact direct call to an address that its procedure inventory omits. On an authored arm64 Mach-O with a call into an unflagged executable section, Kuna 1.990 and 1.1000 both returned the call and decompiled the destination on request. REA's ordinary pseudocode lookup refused the address.
Change
Use
procedure_pseudo_codewithanalysis: "call_destination"orrea decompile --analysis call_destinationto request a standalone attempt. Kuna's selected file must be arm64 Mach-O. The Mach-O layout must place the exact address in file-backed executable section bytes, and Kuna must report an exact direct call from an entry in its procedure inventory.The result retains the call site, caller, target, instruction, and xref digest in linked source Evidence. A failed or cancelled standalone attempt carries the completed call observation alongside the original error. A target-format refusal applies to the selected mode, so ordinary decompilation stays available. The standalone body does not establish function boundaries or add an entry to procedure inventory or project export. Existing procedure lookups and bulk decompilation retain their own inventory rules. The standalone mode uses the existing Kuna process owner, timeout and cleanup.
Validation
return 0x2a;for the exact call destination. MCP recovered it before and after export and refused adjacent known data. Forced native decompilation of that data returned plausible pseudocode. The fixture was not run and its digest was unchanged.--addrincluded the body.check:ci:fastanddocs:checkpassed. The advertised catalog check validated all 256 schemas with Python jsonschema and all patterns with the available V8, Go, Python, and C++ engines. The optional Rust validators were unavailable locally.Minimal arm64 Mach-O fixture
Save as
fixture.sand build withclang -arch arm64 -Wl,-e,_main fixture.s -o fixture. Usenm fixturefor the two addresses.Author readiness