Skip to content

Real-Hopper verifier for caller/callee chains #342

Done

Description

@morluto

Run the licensed real-Hopper verifier to prove caller/callee chains across main, entry, branch, and leaf functions, including typed identities and instruction-level string/name reference edges.

Acceptance:

  • Assertion layer rejects value-only reference matches from another procedure.
  • Global-name references are bound to the queried procedure address.
  • Results survive npm run check.

Part of #54.

Activity

  1. added
    enhancement
    P0: critical
    on Jul 20, 2026
  2. added
    area: native
    on Oct 14, 2026
  3. added
    triage
    on Nov 5, 2026
  4. Diego-9612 commented on Nov 17, 2026

    @Diego-9612

    I ran the existing real-Hopper caller verifier on current main and it passes. Results below, mapped to the acceptance criteria.

    Environment: macOS 26.6.2 (arm64), Hopper Disassembler 6.6.2-demo (not a licensed build), Xcode Command Line Tools clang, Node 24.22.1 (.nvmrc). main at 7107abf8.

    Command: npm run verify:hopper:callers → exit 0 (about 22 s including build:cached).

    {"event":"tail_call_verified","from":"0x100000474","site":"0x100000474","to":"0x100000460","sha256":"ed47b415ec0a08368b8059e7b008e194b3ce3f52355db611b6eb46add53e69ac"}
    {"event":"progress_cancel_retry_verified", ... "hopper_caller_reconciliation: Examined 4002 of 4002 procedures", "get_call_graph: completed" ...}
    

    What this run covers (from scripts/verify-real-hopper-callers.mjs):

    #342 criterion Covered by this verifier?
    Caller/callee chain Partly. One direct tail branch (_call_direct → _target_fn), checked consistently across procedure_callees, procedure_callers (including forward provenance), analyze_function, backward get_call_graph and trace_call_path (goal_status: reached)
    …across main, entry, branch, and leaf functions No. Only the tail-branch pair is asserted; no main/entry → leaf chain
    Instruction-level name reference edges Yes for the branch site: the incoming reference must match source_address, source_procedure.address, target_procedure.address and call.classification: "direct"
    Instruction-level string reference edges No string references are asserted
    Rejects value-only reference matches from another procedure Yes, via the matchingRef source-procedure binding above
    Global-name references bound to the queried procedure address Partly. The queried target's incoming reference is bound by address; global names are not separately exercised
    Results survive npm run check Not established here. On main, npm run check currently fails in knip and lint:typed in files unrelated to this verifier (observed while preparing #11685)

    The run also verified fixture immutability (SHA-256 unchanged), monotonic progress, cancellation after partial scan progress, and a successful retry on the large fixture.

    Gaps: the run used the demo Hopper build, while the issue asks for a licensed one, and the verifier does not exercise the main/entry/leaf chain or string reference edges.

    If it helps, I can extend verify-real-hopper-callers.mjs, or its fixture, to cover a main → entry → branch → leaf chain plus string and global-name reference edges, and re-run it on this host. Would that be the right way to close out this issue?

  5. Diego-9612 commented on Nov 17, 2026

    @Diego-9612

    Correction to my earlier comment: the full main → entry → branch → leaf chain is already covered by npm run verify:hopper, not by the callers verifier. It uses tests/conformance/c/fixture.c through verifyRealHopperFixture.

    On current main that verifier failed on my host for two stale verifier assumptions (details and fixes in #11800). With #11800 applied, it passes with real Hopper (6.6.2-demo, macOS 26.6.2 arm64):

    • _main 0x100000670 → _rea_entry 0x10000063c → _rea_branch 0x1000005e4 → _rea_leaf 0x1000005ac, with caller/callee identities checked at each step;
    • entryStrings 1 (REA_C_ENTRY), leafStrings 1 (REA_C_LEAF), leafNames 3 (including the rea_c_global name reference);
    • outgoing references from procedure_references match the dossier's.

    Remaining gap against this issue: the run used the demo Hopper build, not a licensed one.

  6. added
    area: tests
    provider: hopper
    area: bridge
    and removed on Nov 23, 2026
  7. morluto commented on Nov 24, 2026

    @morluto
    OwnerAuthor

    Closing as implemented: scripts/lib/real-hopper-semantic.mjs (verifyRealHopperFixture with HOPPER_C_ORACLE covering main -> rea_entry -> rea_branch -> rea_leaf), scripts/lib/real-hopper-assertions.mjs (requireReferencedValue binding referenced_strings and referenced_names to source_address and outgoing_references), and scripts/verify-real-hopper-callers.mjs (npm run verify:hopper:callers) verify real-Hopper caller/callee chains and instruction-level reference binding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0: criticalarea: bridgearea: nativearea: testsenhancementprovider: hoppertriage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions