Repository navigation
fix(ghidra): guide recovery from unresolved procedure selectors - #8470
Conversation
[Medium impact] The reviewed changes appear safe to merge. SummaryThe PR gives unresolved procedure selectors and file offsets specific Ghidra errors and useful recovery guidance.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Procedure selector] --> B[Ghidra lookup]
B --> C[Procedure missing]
B --> D[Procedure name ambiguous]
B --> E[File offset unmapped]
B --> F[File offset ambiguous]
C --> G[Inventory guidance]
D --> H[Choose a reported address]
E --> I[Inspect loaded mappings]
F --> H
G --> J[Shared CLI and MCP invalid_request]
H --> J
I --> J
Reviews (6) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile |
Codex Review SummaryThis 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. |
|
Current-main integration control: an isolated, uncommitted merge of PR head This is a temporary integration, not a new PR head or a clean full verifier run; it covers one host and fixture and does not establish autonomous-agent selection. |
…e-lookup-recovery
Combined current-head real-Ghidra laneOn PR #8470 head This is a combined verification of four unmerged verifier changes with #8470, not a pass of the unmodified #8470 head or proof of other platforms. The full |
Problem and outcome
When Ghidra cannot uniquely resolve a valid procedure selector or source-file offset, REA gives generic schema-repair advice. Report the actual lookup or mapping outcome and direct the caller to the procedure inventory, an explicit candidate address, or the load-image mapping as appropriate. Addresses #8208; related: #8178.
For an existing selected project, recovery explains that its analysis history is unknown and that a separate fresh import excludes its annotations and other edits. REA does not switch projects automatically. Ambiguous results retain candidate addresses; file-offset fallback and ordinary malformed-input handling remain intact. The public error code remains
invalid_request.The Ghidra bridge owns the lookup outcomes and the provider projects their CLI/MCP recovery. This changes read-only analysis guidance and adds no target authority or compatibility shim.
Validation
check:fast,docs:check, andgit diff --checkpassed on head842cf7cd1._evaluate, gave project-aware recovery, and stayed usable; a fresh import of the same binary found and decompiled it. An invented missing name produced inventory advice in both modes, with the project-specific warning only in selected-project mode. Target and project-file hashes remained unchanged.node scripts/verify-real-ghidra.mjsfailed at the existing [Bug] Ghidra verification sends function Evidence beyond the default MCP input allowance #8172compare_functionsverifier request, which exceeds the default 1,024-element MCP input allowance before tool execution. In an isolated checkout combining this head with the four unmerged verifier corrections fix(verification): compare retained Ghidra function evidence #8672, test(ghidra): check retained historical snapshot evidence #8381, test(ghidra): check structured snapshot profile mismatch #8536 and test(ghidra): check regex recovery at its owning boundary #8578, the real host-native lane passed: four fixture variants, 439 successful and 52 rejected boundary calls, complete cleanup, verified process lineage and no remaining descendants. Details and exact heads. This is not a clean-head verifier pass.Windows, Linux, other Ghidra versions and broader project histories remain unverified. The Linux verifier additions were not run locally. Hosted CI is running on the current head.
Author readiness
Human owner:
Before merge
type(scope): outcome.