rea/tests/conformance/ghidra
morluto d4bd65c53c fix(providers)!: preserve readiness, coverage, and diagnostic ownership
Share tagged readiness observations, retain partial provider facts, authenticate bridge identity, bound diagnostics, and preserve cancellation and lost-session reasons. Fail closed for unparsed MIPS ABI attributes and macOS saved Hopper databases without a script-capable bridge route.

Reviewed fixes: #2010, #2108, #2513, #2695, #2731, #2771, #2828, #2867, #2868, #2870, #2880, #2919, #2945, #2961, #2981, #2998, #3000, #3002.

Validation: 285 focused source/boundary tests passed. Real Ghidra, IDA, Linux Hopper, and Windows provider runs were not repeated.

BREAKING CHANGE: MIPS targets with unresolved GNU ABI attributes and saved Hopper databases on macOS are refused rather than advertised as supported.
2026-10-14 08:28:14 +08:00
..
6502.cfg feat(ghidra): support raw NMOS 6502 analysis (#2079) 2026-10-13 21:13:01 +08:00
6502.s feat(ghidra): support raw NMOS 6502 analysis (#2079) 2026-10-13 21:13:01 +08:00
README.md feat(ghidra): admit RISC-V ELF analysis through a pinned generic lane (#2151) 2026-10-13 00:11:35 +08:00
ReaAnalyzerOptionsRegressionProbe.java feat(ghidra): apply validated analyzer overrides before analysis 2026-10-12 03:49:31 +08:00
ReaFileOffsetSourceProbe.java fix(ghidra): resolve file offsets in decompile (#2101) 2026-10-13 18:23:17 +08:00
ReaNoReturnProbe.java fix(providers)!: preserve readiness, coverage, and diagnostic ownership 2026-10-14 08:28:14 +08:00
ReaSeedRegressionProbe.java feat(ghidra): configurable import language and analysis seeds (#1667) 2026-10-11 09:57:38 +08:00
ReaSwitchEvidenceProbe.java fix(ghidra): recover evidenced switch cases and default targets (#579) 2026-10-05 22:54:17 +08:00
cross-format.c fix(ghidra): keep the cross-format branch callee multi-block 2026-10-10 01:36:11 +02:00
dos-com-fixture.mjs feat(ghidra): admit explicit DOS COM analysis (#702) 2026-10-06 16:26:40 +08:00
dos-mz-fixture.mjs feat(ghidra): add DOS MZ analysis and complete function extents (#556) 2026-10-05 20:09:45 +08:00
entry-aliases.c test(ghidra): preserve metadata in interior-label fixture 2026-10-11 06:10:10 +08:00
inventory.c fix(ghidra): expose terminal-call boundary assumptions 2026-10-11 09:08:01 +08:00
large-results.c fix(mcp): preserve retained evidence on oversized delivery 2026-10-09 05:55:55 +08:00
mips-checks.d.mts feat(ghidra): admit relocatable MIPS32r2 ELF objects (#1950) 2026-10-12 05:02:55 +08:00
mips-checks.mjs feat(ghidra): admit recordless legacy MIPS32 ELFs with a pinned 32-bit language (#1898) 2026-10-13 21:42:38 +08:00
mips-checks.test.ts feat(ghidra): admit soft-float MIPS32r2 ELF with integer-register float storage (#1949) 2026-10-12 04:54:38 +08:00
mips-fixture.mjs feat(ghidra): admit recordless legacy MIPS32 ELFs with a pinned 32-bit language (#1898) 2026-10-13 21:42:38 +08:00
mips-probe.S feat(native): admit bounded MIPS ELF analysis through Ghidra (#1362) 2026-10-10 23:04:27 +08:00
mips-relocatable-checks.d.mts feat(ghidra): admit relocatable MIPS32r2 ELF objects (#1950) 2026-10-12 05:02:55 +08:00
mips-relocatable-checks.mjs feat(ghidra): admit relocatable MIPS32r2 ELF objects (#1950) 2026-10-12 05:02:55 +08:00
mips-relocatable-checks.test.ts fix(reverse): reconcile cleanup ownership and mutation diagnostics (#2799) 2026-10-14 04:47:34 +08:00
mips16-recordless.ld feat(ghidra): admit verified MIPS16 shared ELF images 2026-10-12 07:50:31 +08:00
mips16-shared-fixture.mjs feat(ghidra): admit verified MIPS16 shared ELF images 2026-10-12 07:50:31 +08:00
mips16-shared.S feat(ghidra): admit verified MIPS16 shared ELF images 2026-10-12 07:50:31 +08:00
namespaces.c fix(ghidra): reject address names owned by another symbol 2026-10-11 07:35:48 +08:00
no-return.c fix(ghidra): normalize Mach-O imported symbol names 2026-10-11 09:59:27 +08:00
ppc-checks.d.mts feat(ghidra): admit 32-bit big-endian PowerPC ELF (#1747) 2026-10-14 06:35:55 +08:00
ppc-checks.mjs feat(ghidra): admit 32-bit big-endian PowerPC ELF (#1747) 2026-10-14 06:35:55 +08:00
ppc-checks.test.ts feat(ghidra): admit 32-bit big-endian PowerPC ELF (#1747) 2026-10-14 06:35:55 +08:00
ppc-fixture.mjs feat(ghidra): admit 32-bit big-endian PowerPC ELF (#1747) 2026-10-14 06:35:55 +08:00
ppc-probe.S feat(ghidra): admit 32-bit big-endian PowerPC ELF (#1747) 2026-10-14 06:35:55 +08:00
psp-checks.test.ts feat(ghidra): admit bounded PSP ELF through installed Allegrex (#1599) 2026-10-11 19:47:33 +08:00
psp-fixture.d.mts feat(ghidra): admit bounded PSP ELF through installed Allegrex (#1599) 2026-10-11 19:47:33 +08:00
psp-fixture.mjs feat(ghidra): admit bounded PSP ELF through installed Allegrex (#1599) 2026-10-11 19:47:33 +08:00
relative-switch-signed.S feat(ghidra): recover signed AArch64 relative jump tables (#1592) 2026-10-11 10:45:35 +08:00
relative-switch.S feat(native): add inspection primitives, dispatch traces and approved UI observation (#500) 2026-10-04 16:02:36 +08:00
riscv-fixture.mjs feat(ghidra): admit RISC-V ELF analysis through a pinned generic lane (#2151) 2026-10-13 00:11:35 +08:00
riscv-probe.S feat(ghidra): admit RISC-V ELF analysis through a pinned generic lane (#2151) 2026-10-13 00:11:35 +08:00
switch-fixture.mjs fix(ghidra): recover evidenced switch cases and default targets (#579) 2026-10-05 22:54:17 +08:00

README.md

Ghidra conformance corpus

These source-owned fixtures are compiled at verification time; generated binaries and Ghidra projects are never committed.

  • ../c/riscv.c and riscv-probe.S produce source-owned RV32/RV64 ELF images with double-float ABI declarations and an independently known instruction. npm run verify:ghidra:riscv exercises real CLI/MCP discovery, decompilation, output schemas, profile and snapshot identity, refusal diagnostics, immutable source bytes, and owned cleanup. It requires BYO Ghidra 12.1.4/JDK 21+ and RISC-V Clang/LLD/LLVM readelf; REA_RISCV_CLANG, REA_RISCV_LLD and REA_RISCV_READELF select existing tool commands.

  • inventory.c produces separate x86-64 debug and stripped ELF executables. It covers imports, an external puts function, linker thunks, source symbols, direct calls, a targetless callback call, two referenced strings, and a multi-block branch.

  • entry-aliases.c preserves secondary imported entry labels, a bare-hex alias, and an interior label. The native CLI/MCP lane verifies entry selection, annotation, interior-label rejection, and unchanged source bytes.

  • cross-format.c is freestanding so the verifier can produce AArch64 ELF, x86-64 PE, and x86-64 Mach-O targets from the same semantics. It preserves an exported entry, direct and indirect calls, a volatile string reference, and a multi-block branch across loaders.

  • no-return.c and ReaNoReturnProbe.java inject incorrect import flags into a real ELF or Mach-O analysis database, verify caller recovery, propagated flag repair and signature preservation, and retain genuine/unknown no-return calls and independently identified entries. Run npm run build:cached, then node scripts/verify-real-ghidra-noreturn.mjs with the Ghidra/JDK environment below on Linux or macOS x64/arm64. On Linux, use a procps-compatible process table that exposes REA's current process for owned cleanup. It also checks named limitations through the real read-only TCP bridge and provider Evidence projection; default Unix-socket transport, Windows, and the reported Amethyst artifact need separate verification. Fixture target code is never executed.

scripts/verify-real-ghidra.mjs uses cc, clang, and lld-link by default; REA_CC, REA_CLANG, and REA_LLD_LINK can select alternate commands. The verifier requires the verified bring-your-own Ghidra 12.1.4 installation through GHIDRA_INSTALL_DIR and validates header classification before starting the provider. Provider admission accepts the rest of the 12.1.x line; this lane does not.

Conformance compares semantic facts: provider/profile identity, function classification, resolved call edges, typed references, strings/xrefs, and CFG topology. It only requires provider pseudocode and assembly to be non-empty, bounded, and address-bearing; it never compares their text with Hopper. The callback fixture also proves that an unresolved targetless flow is not silently promoted to a direct callee. Every target runs in a separate owned project and must leave no process, socket, project, or runtime root after close.

relative-switch-signed.S covers signed halfword offsets, the CBZ zero-entry route, and selector biases of 0, 2 and 10 in the AArch64 jump-table lane. The nonzero biases exercise overlapping and disjoint typed label/index ranges. REA retains Ghidra's typed labels when the compared selector has an earlier register definition; additional labels remain unknown until their relationship to the typed switch selector can be proved. The oracle rejects extra numeric labels and verifies each retained target against the source instruction immediate.