Repository navigation
fix(hopper): probe interior navigation from multi-byte instructions - #1285
Merged
Merged
Conversation
The real-Hopper navigation probe derived its interior coordinate as anchor + 1, which assumes the fixture procedure's first instruction is longer than one byte. Host toolchains without endbr64-style prologue padding (Kali gcc 16, or any build with -fcf-protection=none) compile rea_entry to start with the one-byte push rbp, so anchor + 1 is itself an instruction boundary: goto_address correctly observes that boundary and the boundary-contract run rejects a correct bridge. Advance the probe to the first instruction followed by a coordinate gap larger than one byte and derive the interior-coordinate assertions from that instruction, so the probed coordinate is never an analyzed-object boundary on either prologue encoding.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Oct 9, 2026
darsrc
pushed a commit
to darsrc/rea
that referenced
this pull request
Oct 10, 2026
…orluto#1285) The real-Hopper navigation probe derived its interior coordinate as anchor + 1, which assumes the fixture procedure's first instruction is longer than one byte. Host toolchains without endbr64-style prologue padding (Kali gcc 16, or any build with -fcf-protection=none) compile rea_entry to start with the one-byte push rbp, so anchor + 1 is itself an instruction boundary: goto_address correctly observes that boundary and the boundary-contract run rejects a correct bridge. Advance the probe to the first instruction followed by a coordinate gap larger than one byte and derive the interior-coordinate assertions from that instruction, so the probed coordinate is never an analyzed-object boundary on either prologue encoding.
Owner
|
Nice catch on the verifier’s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The real-Hopper boundary-contract navigation probe derived its interior coordinate as
anchor + 1, which silently assumes the fixture procedure's first instruction is longer than one byte. On host toolchains that compile the fixture prologue withoutendbr64padding, the first instruction is the one-bytepush rbp, soanchor + 1is itself an instruction boundary:goto_addresscorrectly snaps to (and reports) that boundary, and the verifier rejects a correct bridge. The probe now anchors to the first instruction followed by a coordinate gap larger than one byte, so the probed coordinate is strictly inside an instruction on either prologue encoding. Related to the conformance work in #31 / #341.Problem and expected behavior
Smallest trigger:
npm run verify:hopper:linuxwith fixtures compiled by a gcc that does not default to-fcf-protection(reproduced on Kali rolling, gcc 16.2.0, whererea_entrycompiles topush rbpat0x4011b6followed bymov rbp,rspat0x4011b7).Violated invariant: the navigation contract probe must exercise an interior (non-boundary) coordinate. With a one-byte first instruction,
goto_address(anchor + 1)legitimately returnsanchor + 1, and the run fails atscripts/lib/real-hopper-navigation.mjs(goto_addressobserved0x4011b7, expected0x4011b6) even though the bridge, contract text ("Interior coordinates snap to the containing analyzed object's start"), and cursor behavior are all correct.Change and scope
verifyNavigationnow walks the instruction coordinates to the first instruction whose successor coordinate is more than one byte away, then derivesgoto_addresssnap,current_address,next_address,prev_address, and post-rejection cursor assertions from that instruction. When the first instruction is multi-byte (the endbr64 encoding used by the CI target hosts),anchorstays 0 and every assertion is identical to the previous ones. Nothing outsidescripts/lib/real-hopper-navigation.mjschanges; bridge, contracts, fixtures, and oracles are untouched. Intentionally not included: the same+ 1interior-coordinate pattern inscripts/lib/real-ghidra-boundaries.mjs(inspect_native_instructionnot-instruction-boundary probe) is not changed here because I could not execute that lane end to end; flagging it for a maintainer decision instead.Contract and boundary impact
scripts/lib/real-hopper-navigation.mjs); no runtime stage changes.-fcf-protection); no provider or bridge change.docs/public/product-catalog.json), package, or installation impact: not applicable.Evidence and regression coverage
0294ced141cc373468ee22d8343e7dac41980cb05a937994ca81c9f09afe7ded) driven through the private-Xvfb demo lane:goto_addressinterior assertion (0x4011b7observed vs0x4011b6expected) with default-toolchain fixtures.cleanShutdown: true, process lineage verified with zero retained descendants, unrelated-Hopper sentinel survived, 139-tool catalog parity, 171 successful and 63 rejected boundary-contract calls, all navigation/workflow/search flags true.-fcf-protection=branch(endbr64first instruction) complete identically on the same code, confirming the multi-byte path keeps the previous assertions.