mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
Open
opened 2026-10-15 18:23:07 +00:00 by bsakaguchi
·
3 comments
No Branch/Tag specified
main
codex/procedure-reference-stacked
release-please--branches--main--components--rea-agents
release-please--branches--main--components--rea-agents--release-notes
codex/kuna-independent-retry
codex/byte-search-overlay-coverage
codex/open-failure-target-receipt
codex/kuna-xref-evidence
codex/ghidra-ambiguous-procedure-recovery
codex/function-source-bundle
codex/trace-function-integration-prototype
codex/snapshot-source-closure
codex/recorded-evidence-array-pages
codex/evidence-recovery-redesign
codex/trace-feature-address-scope
codex/call-discovery-scope
codex/ghidra-literal-candidate-evidence
codex/decompile-directory-independent-retry
codex/retry-provenance-base
codex/value-flow-capability-experiment
codex/ghidra-containing-instruction
cursor/readme-discord-button-ef9f
dependabot/github_actions/actions/setup-node-7.1.0
dependabot/github_actions/actions/upload-artifact-7.0.2
dependabot/npm_and_yarn/npm-minor-and-patch-d8d97ce6df
codex/kuna-1989
fix/8559-native-ui-fixture-ownership
fix/8555-go-verifier-mcp-ownership
codex/provider-capability-recovery
fix/8642-rizin-target-stdin
codex/ghidra-memory-effect-scope
codex/ghidra-annotation-entry-selector
codex/ghidra-readonly-recovery
codex/ghidra-regex-verifier-recovery
codex/evidence-discovery-view-guidance
fix/8545-bulk-append-overflow
fix/8428-navigation-refusal-alternatives
codex/address-context-recovery
codex/matching-member-limitations
codex/unknown-scope-contract
codex/evidence-view-guidance
feat/8373-native-trace-views
codex/ghidra-snapshot-verifier-binding
codex/elf-export-visibility
codex/evidence-view-recovery
codex/native-reference-cli-help
codex/provider-candidate-observation-scope
codex/kuna-session-verification
codex/ghidra-switch-lifetime-guidance
codex/pseudocode-paging-discovery
codex/clarify-evidence-view-support
codex/kuna-xrefs-selector-recovery
codex/context-capacity-recovery
codex/evidence-closure-large-links
codex/same-function-evidence-identity
codex/ghidra-verifier-inspected-jdk
codex/audit-guided-workflows
codex/crash-prompt-retained-dossiers
codex/analysis-view-error-recovery
codex/kuna-verifier-target-selection
codex/ghidra-selected-project-call-coverage
codex/docs-native-analysis-scope
codex/ghidra-java-socket-boundary
codex/ghidra-retained-snapshot-verifier
codex/ghidra-search-inventory-facts
fix/8284-zero-argument-parameter-bindings
fix/8198-ui-action-handler-offset
fix/8257-elf-entry-label-identity
fix/8304-deferred-output-schema-projection
fix/8277-call-path-computed-target-uncertainty
fix/pr-8089-conflicts
fix/ci-static-duplicate-export
dependabot/npm_and_yarn/lint-staged-17.6.0
dependabot/github_actions/actions/download-artifact-8.0.2
dependabot/npm_and_yarn/write-file-atomic-8.0.0
dependabot/npm_and_yarn/canonicalize-5.1.0
dependabot/github_actions/actions/cache/restore-6.1.0
dependabot/npm_and_yarn/toon-format/toon-4.4.0
dependabot/github_actions/actions/deploy-pages-5.0.1
codex/review-fixes-pr-2403
codex/review-fixes-pr-2400
codex/process-terminal-width
codex/test-brittleness-cleanup
verify/7167-browser-connect-macos
fix/7167-browser-connect
feat/native-matching-allowance-setting
feat/browser-scenario-dry-run
test/managed-caller-parameters-20261024
codex/parser-fortythird-boundaries
fix/6926-pinvoke-platform-decorations-20261023
fix/6889-har-body-encoding-20261023
fix/6888-sqlite-schema-budget-20261023
fix/dependency-security-gates-6708
cursor/evidence-overwrite-rebase-b4ac
feat/4057-verify-native-exports
fix/windows-acl-observer-overhead-20261022
cursor/erlang-beam-restack-4476
cursor/pe-certificate-review-bf32
fix/6116-javascript-application-fs-errors
fix/6061-unmapped-runtime-script-unknown
feat/browser-scenario-summary
fix/pe-certificates
codex/verify-3407
cursor/rebase-5699
cursor/rebase-5352
cursor/rebase-5600
cursor/fix-cli-schema-omission-10a8
codex/audit-hopper-shutdown-reasons-20261021
fix/demangle-swift-omitted-record
fix/nib-boolean-value-types
cursor/cancellation-partial-observation-a5ac
fix/ib-object-limit-reasons
fix/electron-fuse-limit-advice
fix/kuna-doctor-dangling-cache
fix/fixed-budget-refusal-advice
fix/js-ipc-listener-dedup
fix/js-return-member-provenance
fix/dmg-integrity-retry-advice
fix/ida-doctor-readiness
fix/kuna-version-probe-output-drain
fix/legacy-swift-runtime-name-matching
fix/dylib-lazy-load-commands
fix/browser-scenario-startup-cancel
fix/swift-nested-punycode-classification
fix/compare-unselected-scopes
fix/objc-method-budget-coverage
fix/dmg-mounted-root-observations
audit/ci-tests-20261019-round2
release/6.7.0
fix/wabt-cleanup-retry-resolution
fix/electron-fuse-elf-pe-architecture
fix/native-plist-descriptor-ownership
fix/kuna-caller-cleanup-ownership
experiment/atomic-codemode-20261016
review/first-contributor-3776
fix/call-resolution-full-read-cycles
fix/member-mutation-selection-repeat
experiment/atomic-re-tools-20261015
perf/member-mutation-lazy-origins
perf/static-network-mutation-index
fix/hopper-startup-lifecycle
audit/3050-windows-proof-20261015
feat/windows-window-capture-2183
audit/3049-windows-proof-20261015
audit/3735-macos-fixtures-20261015
fix/batch-decompile-null-pseudocode
fix/kuna-inventory-honors-jobs
experiment/browser-codemode-tool-design-20261015
fix/hopper-clean-runtime-argv
codex/review-2049-27f1b367
review-fixes/pr-2787-routing
fix/3360-scoped-this-emitters
fix/3367-replaced-global-effects
fix/3838-compact-any-value-items
test/hopper-download-probe-20261015
codex/windows-runtime-creation-red-green-20261015
codex/windows-readonly-root-red-green-20261015
codex/windows-root-share-red-green-20261015
codex/exp-1685-win-mcp-startup
codex/bug-sweep-20261015
investigate/2190-windows-package-phases
investigate/3543-macos-cli-deadline
perf/3281-reverse-tools-feedback-quality
fix/3406-hopper-doctor-fixture
fix/3341-wrapper-require-test-context
fix/3301-owned-uninstall-fixtures
fix/3164-compiler-input-ownership
fix/pcap-cleanup-stdout-newline-20261014
perf/interface-builder-summary
codex/review-fixes-pr-1977
fix/ghidra-effective-jvm-platform
fix/docs-turkish-rust-link-20261013
fix/main-maintenance-ci-20261010
fix/recover-binary-session-process-effects
codex/review-fixes-pr-2457
codex/ci-required-cancellation-gate
fix/main-format-baseline-20261013
fix/setup-preserve-entry-fields
cursor/restore-main-checks-1ffc
fix/ghidra-bridge-hashmap-import
codex/shared-ci-jadx-json-default-20261013
codex/shared-ci-ghidra-test-groups-20261013
codex/shared-ci-java-fixture-format-20261013
codex/fix-intrinsic-invocation-boundaries
test/release-preflight-reusable-jobs
test/js-parameter-provenance-expectation
fix/linux-hopper-verification-current
test/2419-ghidra-elf-probe-size
followup/pr-1544-native-ida
codex/fold-pr-2230-contribution
docs/readme-responsible-use
fix/issue-2064
fix/issue-2050
fix/issue-2053
fix/issue-1968
fix/issue-1945
experiment/codemode-bridge-20261011
fix/tool-effects-negative-wording-1904-20261012
fix/1842-electron-interop-provenance
feat/recover-javascript-multi-input
refactor/website-i18n-prep
fix/nativeaot-pe-virtual-extent
fix/browser-verifier-ci-hang
fix/pe-resources-input-selection
docs/beginner-friendly-guides
docs/beginner-setup-guide
fix/javascript-analysis-worker-1563
fix/1649-ghidra-duplicate-names
fix/javascript-export-keys-integration-1369
test/maintenance-boundary-contracts-20261011
review/javascript-export-keys-1369
review/process-live-progress-1483
test/javascript-1495-growth-ratio
fix/ci-escape-timing
docs/normalized-terminal-geometry-1450
release/6.3.0
archive/release-6.3.0-pr1381
release/6.2.0
fix/electron-preload-dynamic-override
fix/javascript-self-referential-bundler-edges
release/6.1.0
cursor/grok-client-cherry-pick-0b56
feat/signature-posture
feat/dyld-shared-cache
feat/artifact-integrity-policy
feat/pkg-inventory
release/6.0.0
chore/sync-release-5.0.0
release/5.0.0
cursor/cloud-agent-node-787e
fix/javascript-xhr-open-endpoints
review/pr-711-realpath-fallback-wording
cleanup/replay-confinement
codex/test-suite-performance
codex/issue-foundations
codex/address-open-issues-2026-07-20
agent/javascript-vite-rollup-esbuild-adapters
agent/process-cleanup
agent/triage-integration
agent/unknown-commands-registry
feat/mcp-identity-metadata
morlvps/issue_cleanup
codex/installer-redesign
morl/roadmap-investigation-core
morl/roadmap-investigation-docs
release-please--branches--main--components--rea
rea-agents-6.8.0
rea-agents-6.7.0
rea-agents-6.6.0
experiment/atomic-codemode-wait-runtime-20261016
rea-agents-6.5.0
rea-agents-6.4.0
rea-agents-6.3.0
rea-agents-6.2.0
rea-agents-6.1.0
rea-agents-6.0.0
rea-agents-5.0.0
rea-agents-4.1.0
rea-agents-4.0.1
rea-agents-4.0.0
rea-agents-3.2.1
rea-agents-3.2.0
rea-agents-3.1.0
rea-agents-3.0.0
rea-agents-2.7.0
rea-agents-2.6.0
rea-agents-2.5.1
rea-agents-2.5.0
rea-agents-2.4.0
rea-agents-2.3.0
rea-agents-2.2.0
rea-agents-2.1.0
rea-agents-2.0.0
rea-agents-1.7.0
rea-agents-1.6.0
rea-agents-1.5.0
rea-agents-1.4.0
rea-agents-1.3.0
rea-agents-1.2.0
rea-agents-1.1.0
rea-agents-1.0.0
rea-agents-0.5.0
rea-agents-0.4.0
rea-agents-0.3.0
rea-0.2.1
rea-0.2.0
Labels
Clear labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
Mirrored from GitHub Pull Request
question
roadmap
triage
No labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
question
roadmap
triage
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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#261
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @morluto on GitHub (Sep 29, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/487
Before submitting
Area
Native analysis or decompilation
Current limitation
REA's Ghidra native API boundary can report candidate jump-table mappings, but AArch64 analysis may leave table bounds and case-value-to-target relationships unresolved. In a real Ghidra 12.1.4 run on a source-built ARM64 Mach-O switch fixture, the result contained 41 mappings and five residual unknowns; two of those unknowns concerned exact table entry size/count and case-value mapping. This is a coverage observation, not evidence that the returned mappings are incorrect.
Use cases
Desired outcome and success criteria
Improve REA's Ghidra AArch64 jump-table extraction and reporting where the binary and Ghidra evidence support it. The result should:
Add source-owned fixtures for ARM64 Mach-O and AArch64 ELF switch layouts, including dense, sparse, stripped, and optimized variants where the supported toolchain can produce them. Verify exact mappings for recoverable cases and explicit unknowns for cases that remain ambiguous. Keep this coverage in the host-native or cross-format Ghidra lanes according to the fixture's toolchain requirements.
Authority boundaries and non-goals
Related work
@CassieFox23 commented on GitHub (Oct 9, 2026):
TL;DR: I ran this on two real AArch64 ELF libraries from open-source Android apps. Switches the compiler made came back fully mapped. Hand-written assembly with a computed branch came back empty, and REA did not flag that gap as an unknown. One hand-written jump table failed with a decompiler error dressed up as "retry or run doctor".
Data point on real AArch64 ELF targets with the published
rea-agents@6.2.0, throughrea inspect-native-api <so> <address> --provider ghidra. Targets:librenderscript-toolkit.so(387 KB, NDK r21e). It is the Apache-2.0 RenderScript toolkit from AOSP as shipped in Lawnchair 14, itself Apache-2.0.libjni_latinime.so(1.3 MB, NDK r28). It is the Apache-2.0 AOSP LatinIME engine as shipped in HeliBoard, a GPL-3.0 app.I found dispatch candidates by scanning
.textforbr Xn(428 and 147 sites) and sampled from them.Switches the compiler made came back clean:
brsitesBlendTask::blendghidra-decompiler-load-table, 2-byte entries, 15ColorMatrixTask::kernelHand-written NEON assembly (the blur and blend kernels) is where the gaps are:
br x8at0x1262d8. Ghidra folds it intorsdIntrinsicBlurU1_K(entry0x12c440) as a second body block. The same pattern is at0x12b298in the unnamed kernel at0x12adc0. Herex8is anadrp/addcode address adjusted byx5shifted left 6 and 3. That is a computed jump into unrolled code. Thenjump_tablesis empty,unsupported_branchesis empty, and no residual unknown mentions the dispatch. The dossier reads as complete.rsdIntrinsicBlend_K(0x1255d0, 15 instructions) is a textbook relative halfword table:adrp/add x5to the table,cmp w2, #0xfwithb.csto the default,ldrsh x6, [x5, w2, UXTW #1],cbz x6,adr x5to the dispatch base,add x6, x5, x6,br x6. The call fails withexecution_failure, causeGhidra decompilation failed: Recoverable Error: Unable to find unique hash for varnode, and the remediation says retry once or runrea doctor. A decompiler failure on one function reads as an environment problem.brsites sit in a 10 KB symbol-less stretch betweenrsdIntrinsicBlurU4_KandrsdIntrinsicColorMatrix_int_K. Ghidra's auto-analysis created no procedure there: none of the 1,032 addressed procedures inlist_proceduresfall in0x12c564-0x12edf0. The neighbours are0x12c4d0and0x12edf0. Those sites returnNo procedure exists at the requested address, which is honest, but there is no way to ask about them.More detail
On the silence: in 6.2.0
unsupported_branchesis either empty (boundary available) or the fixed pairstructured-boundary-types/jump-table-data-mapping(boundary unavailable). And the "did not verify a supported byte/halfword relative dispatch chain" limitation only attaches to a table Ghidra already found. So an unresolved computedbrinside an analyzed function has no field that could carry it today.Ten other sampled sites across both libraries reported no table. The seven I looked at were indirect tail calls (the vtable shape
ldr x8, [x0],ldr x16, [x8, #0x28], frame restore,br x16) or a register trampoline. So no table is right. None of the eight sampled LatinIME sites turned out to be a switch, so that library only contributed negatives.Each CLI call re-imported the library. That took about 19 s for the 387 KB one and 29 s for the 1.3 MB one.
Test setup
🤖 Generated with Claude Code (Fable 5.1) 🦊
@RishTheFish21 commented on GitHub (Oct 9, 2026):
I'd like to take a stab at this.Going off @CassieFox23's results, I think there are three separate problems:
brs that Ghidra can't turn into a jump table just vanish from the output. Nothing injump_tables,unsupported_branchesor the unknowns, so it looks complete when it isn't. I'm planning to scan the p-code for leftoverBRANCHINDs and report them in a newunresolved_dispatchesfield (empty for other providers).rsdIntrinsicBlend_K), the whole call fails and tells you to runrea doctor, which won't help. I'd rather return what the listing still knows and mark the native API part as unavailable.Plus new fixtures in
relative-switch.Sfor those shapes, and ARM64 versions of the C switch fixtures.Plan is to do it as a few smaller PRs, starting with the first two. If you'd rather not add a new field to the output, or would prefer a proper error over a partial result when decompiling fails, let me know
@CassieFox23 commented on GitHub (Nov 3, 2026):
TL;DR:
3749ccec4(#1592) did not finish this issue. Main still misses two computed branches on my October library, andrsdIntrinsicBlend_Kstill has no table. Only #2977 at063df5093reports those branches.Results
I ran
rea inspect-native-api <so> <address> --provider ghidra --jsononlibrenderscript-toolkit.so. It is RenderScript code (Apache-2.0). It ships in Lawnchair 14 (Apache-2.0). It is the same file as in my October comment. I built rea from main (c3647ade1) and from #2977 (063df5093) in a Fedora 44 VM. All six calls exited 0 and took 21 to 38 seconds.c3647ade1063df5093rsdIntrinsicBlend_KrsdIntrinsicBlurU1_Kjump_tablesandunsupported_branchesempty. Only unknowns: six inferred types to confirm. Nothing names the dispatch.br x8from my October comment). Also reports 0x126828, which was not in that comment. One unknown per branch.For 0x12c440 and 0x12adc0 on #2977,
unsupported_branchesisindirect-branch-target-recoveryand every branch isjump_table_recovery_failedwith no listing targets.How this maps onto the three problems in RishTheFish21's comment:
brvanishes. Both hand-written kernels give no unknown. With #2977, each branch is reported. It "may be a dispatch inside this function or an indirect tail call". It recovers no targets, so the dispatch stays unknown there.3749ccec4: a decompiler failure reads as "retry or run doctor". The call for 0x1255d0 no longer fails, and the output has no "retry" or "doctor" text.git log -Spoints atc374c2fe7(#4650, 20 October), which added the partial-result path. I did not build an older tree to confirm that this commit caused the change. The varnode error itself still happens, and no table or case list comes back for this function.3749ccec4, not reached on the real library: the AArch64 matcher. I read the code at main: signed and unsigned byte or halfword entries, UXTW or LSL #2, B.HI or B.CS or B.HS, and the CBZ route. It only receives a jump table that Ghidra already reported. 0x1255d0 is the case that motivated it. There, the result gives the decompiler failure above as its reason. No table or case list comes back. I did not run the lane that tests the matcher on its own fixture.Not run
verify:ghidra:*lanes, includingverify:ghidra:aarch64-jump-table. On 10 October that lane took about 380 seconds here. RishTheFish21 reports it stops early on main's host checks.test:focusedor other test run.libjni_latinime.so, and the 291 branches in the symbol-less stretch from my October comment.c374c2fe7, so no before and after for 0x1255d0 on one build.Thanks, RishTheFish21, for #1592 and #2977.
Static read against the issue's success criteria (main
c3647ade1)File and line are at main. "Not done" means I found no code or fixture for it.
bridge/ghidra/ReaGhidraBridge.java3174-3179 (shapes), 2750-2784 (data source with entry size and count), 2880 (mappings)src/application/native/NativeApiInspection.ts70-107 (missing default, empty mappings, missing data source, unknown entry size or count, null case value); bridge 2963-2964 (unsupported encodings, only when Ghidra already found a table). Not done: a computed branch with no table (runs above). Not done: jump-table truncation. A search for "truncat" in the bridge finds only type layouts, instruction and value-flow scans, and address offsetsscripts/verify-real-ghidra-function.mjs700-735 checks ittests/conformance/ghidra/cross-format.cbuilt with--target=aarch64-linux-gnu -O2(scripts/verify-real-ghidra.mjs209-224);relative-switch.Swith 1 and 2 byte entries (151-177);relative-switch-signed.Swith selector bias 0, 2, 10 (178-207)scripts/verify-real-ghidra.mjs157 and 187. Not checkable on Linuxrelative-switch-signed.Sis hand-written with one empty entry (index 3, routed by CBZ). No compiler-made sparse AArch64 switch: the sparseholes_sharedswitch is intests/conformance/ghidra/switch-fixture.mjs11, and its lane asserts Linux x64 (scripts/verify-real-ghidra-switch.mjs49-50)scripts/verify-real-ghidra-switch.mjs(Linux x64 only) and for the host-native fixture (scripts/verify-real-ghidra.mjs140)tests/conformance/ghidra/indirect-branches.Sand a probe. I read its diff and did not run itTest setup
librenderscript-toolkit.so, SHA-256 6f60acc69e73c6a1a0fa66f375d9c2cf2704d19079c89c3211a93ab5b52bddc2, checked against the saved sums in the VM063df5093(#2977) /c3647ade1(main). Each tree was built from its own sources, not from an installed rea-agents.Commands
🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊