[PR #2844] [MERGED] fix(ghidra): import HashMap in the bridge script #5432

Closed
opened 2026-10-31 01:06:35 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2844
Author: @SeokMyungSeop
Created: 10/13/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @morluto

Base: main ← Head: fix/ghidra-bridge-hashmap-import


📝 Commits (1)

  • 4e33790 fix(ghidra): import HashMap in the bridge script

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 bridge/ghidra/ReaGhidraBridge.java (+1 -0)

📄 Description

Summary

ReaGhidraBridge.java uses HashMap (added in 8823c55b0, #2049) without
importing it, so Ghidra cannot compile the bridge script and every
Ghidra-backed operation exits before bridge startup. This adds the missing
import java.util.HashMap;.

Problem and expected behavior

Any Ghidra operation, e.g. rea inspect <pe> --provider ghidra, fails with:

ERROR ReaGhidraBridge.java:3446: error: cannot find symbol
        Map<String, Boolean> selectedValues = new HashMap<>();
  symbol:   class HashMap
... GhidraScriptLoadException: The class could not be found ...

and REA reports execution_failure / "Ghidra exited before bridge startup".
Expected: the bridge compiles and serves operations.

Change and scope

One import line. No behavior change beyond restoring compilation.

Contract and boundary impact

  • CLI and MCP/tool-catalog contract: none

  • Provider, bridge, target-format, or platform compatibility: restores the Ghidra bridge on all platforms

  • Other lines: not applicable

  • Read existing files or captured data.

Evidence and regression coverage

  • Tests added or updated: none; the real Ghidra lanes (e.g. npm run verify:ghidra) compile the bridge and would fail on the base revision.
  • Base reproduction: executed on Windows x64, Ghidra 12.1.4, Temurin JDK 21.0.12.

Validation performed

  • rea inspect C:\Windows\System32\whoami.exe --provider ghidra on base — fails with the compile error above
  • same command with this change — succeeds (341 procedures, 308 strings)
  • npm run check:fast — fails on the base revision at tests/boundary/providers/ghidra/ghidraLauncher.test.ts:431 (max-lines-per-function); unrelated to this Java-only change

Compatibility, safety, and release

  • Breaking changes: none
  • Real Ghidra coverage: Windows x64 only
  • Security, privacy, process, or containment review: not applicable

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/2844 **Author:** [@SeokMyungSeop](https://github.com/SeokMyungSeop) **Created:** 10/13/2026 **Status:** ✅ Merged **Merged:** 10/13/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/ghidra-bridge-hashmap-import` --- ### 📝 Commits (1) - [`4e33790`](https://github.com/morluto/rea/commit/4e33790591740f16323c5d397b3cbef3d82c34af) fix(ghidra): import HashMap in the bridge script ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `bridge/ghidra/ReaGhidraBridge.java` (+1 -0) </details> ### 📄 Description ## Summary `ReaGhidraBridge.java` uses `HashMap` (added in 8823c55b0, #2049) without importing it, so Ghidra cannot compile the bridge script and every Ghidra-backed operation exits before bridge startup. This adds the missing `import java.util.HashMap;`. ## Problem and expected behavior Any Ghidra operation, e.g. `rea inspect <pe> --provider ghidra`, fails with: ERROR ReaGhidraBridge.java:3446: error: cannot find symbol Map<String, Boolean> selectedValues = new HashMap<>(); symbol: class HashMap ... GhidraScriptLoadException: The class could not be found ... and REA reports `execution_failure` / "Ghidra exited before bridge startup". Expected: the bridge compiles and serves operations. ## Change and scope One import line. No behavior change beyond restoring compilation. ## Contract and boundary impact - CLI and MCP/tool-catalog contract: none - Provider, bridge, target-format, or platform compatibility: restores the Ghidra bridge on all platforms - Other lines: not applicable - [x] Read existing files or captured data. ## Evidence and regression coverage - Tests added or updated: none; the real Ghidra lanes (e.g. `npm run verify:ghidra`) compile the bridge and would fail on the base revision. - Base reproduction: executed on Windows x64, Ghidra 12.1.4, Temurin JDK 21.0.12. ## Validation performed - `rea inspect C:\Windows\System32\whoami.exe --provider ghidra` on base — fails with the compile error above - same command with this change — succeeds (341 procedures, 308 strings) - `npm run check:fast` — fails on the base revision at `tests/boundary/providers/ghidra/ghidraLauncher.test.ts:431` (max-lines-per-function); unrelated to this Java-only change ## Compatibility, safety, and release - Breaking changes: none - Real Ghidra coverage: Windows x64 only - Security, privacy, process, or containment review: not applicable 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:06:35 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5432
No description provided.