mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[GH-ISSUE #8358] [Bug] Native value trace does not locate recovered call arguments without bindings #6559
Open
opened 2026-11-01 21:12:14 +00:00 by bsakaguchi
·
2 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#6559
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 (Oct 31, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/8358
Before submitting
Area
Native analysis or decompilation
Observed behavior
trace_native_valueskeeps recovered call operands inline but does not identify which recovered operands lack cross-function parameter bindings. In the x86-64 Ghidra control below, the call has three recovered arguments; one fixed-parameter binding is present, but the other two have no corresponding binding or located unknown. The result'sunknownsarray is empty. Its general limitations do say that missing and variadic arguments remain unknown;traversal.status: "complete"describes budget/policy traversal, not a claim of complete argument recovery.Related: #5523 asks for structured variadic metadata; #8284 concerns a spurious unknown for an empty parameter list; #3083 concerns Ghidra's Apple-arm64 variadic recovery. This report concerns unmatched operands already present in the trace and applies without asserting their cause from the operand count alone.
Reproduction
clang -arch x86_64 -O1 -g -fno-inline -fno-optimize-sibling-calls -fno-stack-protector fixture.c -o fixture. Do not execute it.audit_variadicto a user-definedint audit_variadic(int count, ...)withsetVarArgs(true), and setaudit_fixedto two user-defined integer parameters. Ghidra reported one fixed parameter andhasVarArgs=truefor the former; two andfalsefor the latter. REA selected that project read-only.trace_native_valuesfor_audit_call_variadicwithmax_depth: 1,max_functions: 4,max_call_sites: 20,max_nodes: 500,max_edges: 1000,limit: 500. The CALL node has[target, 2, 7, 11]; there is oneargument-bindingfor ordinal 0, no binding for the other operands, and no unknown. The fixed caller has two call arguments, two bindings and no unknowns. Both traces have complete traversal under those budgets.Expected behavior
Consider identifying recovered operands that lack a recovered parameter binding at the call site, while retaining the known fixed binding and the general limitations. Do not invent formal parameters or assume every unmatched operand proves a variadic signature; source facts and provider uncertainty must govern interpretation.
Impact and scope
An agent examining located unknowns cannot tell which call requires follow-up despite the operands being present in the graph. One x86-64 Mach-O build, fresh and selected Ghidra projects, was tested; other providers, architectures, and runtime behavior are not established. The target was not executed. SHA-256 of the target and all caller-project files remained unchanged during REA sessions. Ghidra logged some DWARF expression failures during import; the selected prototype was explicitly authored afterward.
REA version
d54a4661da20382ad8456564a08569fdd24131c5(source build).Runtime and platform
Node 24.22.1; macOS 26.3 arm64 host; Ghidra 12.1.4; JDK 21.
Target and artifact context
Self-built x86-64 Mach-O; SHA-256
16be6017e676a9bbaf3f346b659f8ae5c7f788a1184199b6dee8a5a8efbe833e.Interface
MCP
Earliest failure stage
Native analysis or reconstruction
Relevant output or evidence
Selected project: call at
0x1000004b5; recovered argument constants2,7,b(hex); only binding hasinput_index: 1;unknowns: []. Fixed control at0x1000004cebinds input indexes 1 and 2. The general variadic limitation is present in both traces.Source-derived reasoning:
NativeValueTrace.tsiterates recovered callee parameters and warns if their ordinal exceeds the caller's recovered arguments, but does not separately report recovered caller arguments with no retained parameter ordinal. This does not establish the correct semantics of every unmatched operand.Additional context
In a disposable experiment, comparing recovered argument indexes with retained parameter ordinals produced a located unknown for x86-64 arguments 1 and 2, while leaving the fixed control unchanged. This is not a proposed production fix: it did not detect the arm64 control's extra stack arguments because Ghidra did not put them in the CALL inputs, and it needs validation for provider truncation, unavailable parameters, multiple call targets, and resource limits. Neither the input binary nor selected projects were modified by REA.
Looping in @gensokyo-dev @kaoru0822-kitauji @N0zoM1z0.
Follow-up: paging, budgets, and offline Evidence
On main
6e9ee97a69cb16c7150d8b550e705cba055ee4f0, I reran the same selected-project x86-64 Ghidra 12.1.4 fixture through SDK-schema-validated stdio MCP. The complete variadic trace contained 40 nodes and 47 edges, with three recovered call arguments and only the first binding. Eight pages of five nodes reconstructed the same nodes and edge multiset (edge order is not preserved by page concatenation). All 13 trace records from the full, fixed-control, paged, and budgeted calls survived bundle export and import with identical normalized results. This comparison does not assert that the individual source Evidence links in current main resolve; that separate issue is #8282.Limits affect what a future located-unknown report can honestly say:
max_depth: 0andmax_functions: 1left the call with no bindings because the callee was not analyzed and returned explicit truncation reasons;max_edges: 1retained the call node but not its call edge and returned the edge-budget reason. Do not label these as proof of a variadic argument or a fully examined missing binding. A finding should name the call and recovered input index while preserving whether the destination and binding were actually examined and retained.The same selected-project controls on #8384 head
1e77ce796b7ad0aa0d160cb5238a596ccac69e46preserved the same graph and limitations. Its source Evidence ownership fix does not itself address unmatched operands. Input and selected-project hashes were unchanged; targets were not executed. This is one fixture/provider/platform and does not prove behavior for multiple targets or provider-side truncation.@morluto commented on GitHub (Nov 1, 2026):
Same binary, different selected prototype
I compared two disposable selected Ghidra 12.1.4 projects for the existing x86-64 fixture (SHA-256
16be6017e676a9bbaf3f346b659f8ae5c7f788a1184199b6dee8a5a8efbe833e) using REAe18594b24754ab95ebd119311cc32a1d1ad6fa13, pinned Node 24.22.1 and SDK stdio MCP with the compact advertised schema. In the second project I explicitly changed the user-definedaudit_variadic(int count, ...)prototype toaudit_variadic(int count)and saved that owned copy before the REA sessions. The source function really is variadic, so the latter is a deliberately inaccurate analysis annotation, not evidence that the binary changed.At the same
0x1000004b5CALL, the variadic project returned the target plus recovered operands2,7,b; only the first operand had a parameter-binding edge. The fixed-prototype project returned the target and operand2only, with the same single binding. Both traces hadunknowns: []and complete traversal under the selected budgets. In both projectsinspect_native_apiexposed the one user-defined parameter, but the tested main revision did not expose the prototype's variadic flag in that boundary result. For each project I exported the session and imported it into a fresh target-free MCP server; the retained trace's normalized result matched the live result. The target and both selected project trees' hashes were unchanged by the REA sessions; the target was not executed.This shows why a located-unmatched-operand finding should describe only recovered operands and available bindings: missing operands are not evidence of absence from the machine call or source signature, and project-supplied signature facts can change what the decompiler emits. It does not establish provider-side truncation behavior or prove a general rule for all calls. Structured prototype visibility is separately discussed in #5523; this control does not claim that any particular PR resolves it.
@morluto commented on GitHub (Nov 1, 2026):
Existing static fallback for this fixture
I exercised the recovery an analyst can use with REA
e18594b24754ab95ebd119311cc32a1d1ad6fa13, Node 24.22.1, compact SDK stdio MCP, and the same unexecuted x86-64 fixture. In both selected Ghidra 12.1.4 projects from the preceding control,analyze_functionretained the same assembly lines before the call:MOV EDI, 0x2,MOV ESI, 0x7, andMOV EDX, 0xb. The deliberately inaccurate fixed prototype changed its pseudocode from a three-operand call to a one-operand call, matching the reduced value trace.inspect_native_instructionseparately exposed decoded bytes, register/immediate operand components, and addresses for all three MOVs and the direct CALL. The dossier, trace, and four instruction Evidence records each matched after export/import into a fresh target-free server. The standaloneprocedure_assemblyoperation on the fixed project also returned those lines with the selected-project history caveat.A separate fresh Kuna 1.986 session on the same file returned those register writes through both
analyze_functionandprocedure_assembly; its reconstructed pseudocode displayed all three operands. Itstrace_native_valuesreturned an explicit no-def-use-model unknown and no value nodes, andinspect_native_instructionreturnedcapability_unavailable. These are different provider observations, not evidence that Kuna read the selected Ghidra project. The target and Ghidra project trees were unchanged by their sessions; no target was executed.Thus an analyst has a current assembly-based fallback for this example, and an instruction-level one with Ghidra. Interpreting the register writes as call arguments still requires ABI, control-flow and register-liveness reasoning; the listed observations alone are not a general automatic argument-recovery algorithm. This does not eliminate the missing located-unknown issue or prove that other binaries/providers expose the same details. No autonomous agent-selection trial was run.