* refactor(verify): run Ghidra verifier commands through the supervised owner (2 of 2)
Route the remaining Ghidra verifier compiler and CLI launches through
createVerifierCommands, close that owner before lineage observation, and
assert the raw arm64 alignment refusal from its structured error.
* fix(verify): stop detached Ghidra verifier commands on interrupt
SIGINT and SIGTERM abort the command owner and the scripts wait for its
cleanup, so a compiler started in its own process group cannot outlive
the verifier.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* fix(verify): stop Ghidra verifier analysis when interrupted
Pass the verifier interruption signal into MCP and Ghidra waits, and stop
waiting for calls that cannot observe it, so SIGINT does not continue the
analysis before cleanup.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* fix(verify): stop the switch evidence probe when the verifier is interrupted
Pass the verifier interruption signal into the detached Ghidra control
probe and end its wait so supervisor.stop() runs before a later SIGKILL.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* fix(verify): observe work already started when a verifier interrupt wins
untilInterrupted now settles the caller's promise after the signal has
already aborted, so a connection started just before the check cannot
reject with nobody listening.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* refactor(verify): share verifier interrupt handling and keep it through release
Move the SIGINT/SIGTERM abort wiring into bindVerifierCommandInterruption.
Handlers stay installed until after fixture release, and untilInterrupted
still observes a promise that was already started.
Co-authored-by: morluto <morluto@users.noreply.github.com>
* fix(verify): keep diagnostic workspaces and stop fixture builds on interrupt
Check the interruption signal after finalization and before the fixture
root is removed. MIPS and RISC-V fixture compilers and readers now run
through the verifier command owner, so SIGTERM aborts them instead of
waiting out their execFile deadline.
Co-authored-by: morluto <morluto@users.noreply.github.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
* feat(ghidra): admit plain MIPS32 PIC shared images
Add an elf32-dyn-o32-arch32r2-standard-v1 lane for ET_DYN images without
an ASE flag (shared libraries and ET_DYN executables), beside the MIPS16
lane. It reuses the complete dynamic-relocation inspection and admits
R_MIPS_NONE, symbol-bearing R_MIPS_REL32 and the TLS loader slots
DTPMOD32/DTPREL32/TPREL32, which stay unapplied with a limitation.
Ghidra's default moves an image linked at 0 to 0x10000 and then shifts
only nonzero local GOT entries, so page-zero GOT entries (how GNU-ld
libraries call static functions) keep unshifted values and calls through
them decompile to wrong addresses. The lane imports at the image's own
ELF image base instead (lowest PT_LOAD in the first 20 headers, as Ghidra
computes it), commits it in the analysis profile and requires the bridge
handshake to report it. Images with a prelink trailer are refused.
verify:ghidra:mips32-shared checks LE, BE and soft-float LLD fixtures laid
out like GNU ld output against an independent readelf oracle: every
REL32, local GOT entry (including a zero page entry), global GOT entry
(EXTERNAL or lazy-binding stub) and unapplied TLS slot, plus named calls
in the decompilation, snapshot round trip and CLI evidence.
Refs #2338
* style(ghidra): format link-base regression scenarios
* test(ghidra): require zero-valued local GOT coverage
* test(ghidra): cover TPREL32 in the shared lane and drop duplicated session suites
Add an initial-exec TLS variable so the MIPS32 shared fixture declares
R_MIPS_TLS_TPREL32 beside DTPMOD32/DTPREL32, and require all three slots
to stay UNSUPPORTED with unchanged bytes. Remove the soft-float and
mutation handshake suites that the main reconciliation duplicated in
GhidraSessionValues.test.ts.
* test(ghidra): read the section table in the MIPS32 shared-library oracle
parseMipsReadelf now confirms the fixture's section types from readelf -S
(main added -S to the executable, relocatable and PSP oracles). Request it in
the shared-library oracle too.
* test(ghidra): follow main's verifier contracts in the MIPS32 shared lane
Main made the Ghidra installation probe asynchronous behind the shared
inspectVerifierGhidraInstallation helper, and analyze_function now returns a
summary unless detail "complete" is requested. Use both, as the other MIPS
lanes do.
* refactor(ghidra): keep Ghidra's image-base rule out of shared ELF parsing
The shared MIPS ELF reader computed Ghidra's ElfHeader.getImageBase rule
(lowest PT_LOAD address among the first 20 program headers) and the domain
type described it as Ghidra's base. Record source facts instead: every
PT_LOAD virtual address with its program-header index, plus the Android
prelink trailer. ghidraMipsElfImageBase in GhidraMipsProfile now applies
Ghidra's rule to those facts. The committed elf_image_base is unchanged.
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>