Skip to content

jit(fbw): fix broken main — drop #763's residual last_caught_exception_value propagation (removed in #756) - #765

Merged
youknowone merged 1 commit into
mainfrom
fix-763-last-caught-build
Jul 24, 2026
Merged

youknowone merged 1 commit into
mainfrom
fix-763-last-caught-build

Conversation

@youknowone

@youknowone youknowone commented Jul 24, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

origin/main does not compile. pyre-jit-trace fails with 4× E0609:

error[E0609]: no field `last_caught_exception_value` on type `majit_metainterp::MIFrame`
  --> pyre/pyre-jit-trace/src/jitcode_dispatch/residual_call.rs:240
error[E0609]: no field `last_caught_exception_value` on type `InlineFrame`
  --> pyre/pyre-jit-trace/src/jitcode_dispatch/residual_call.rs:241
  (same at :273 for MIFrame and &InlineFrame)

Because PR CI builds merge(PR, main), this reddens every open PR, not just the one that introduced it.

Root cause

Stale-branch merge:

Fix

Drop #763's vestigial per-frame last_caught_exception_value propagation to match #756's instruction-keyed model — not restore the field (that would undo #756's design). The removed lines only copied the field between reconstructed frames; the multi-frame build path is PYRE_FBW_MULTIFRAME-gated (default off), so there is no behavior change.

Verification

python3 ./pyre/check.py on the fix:

ALL PASSED: dynasm 303/303
ALL PASSED: cranelift 303/303
ALL PASSED: wasm 300/300

— commented by Claude

Summary by CodeRabbit

  • Bug Fixes
    • Corrected exception state handling when resuming execution after a residual call.
    • Prevented exception-catch information from being incorrectly carried over between nested execution frames.

build_multi_frame_miframe copies last_caught_exception_value between the
reconstructed InlineFrame/MIFrame chain, but #756 removed that field from
MIFrame, BlackholeInterpreter, InlineFrame, and WalkSession — traceback
recording is keyed on the raising instruction, not object identity. #763
was based before #756 and merged after it, so the references no longer
resolve and pyre-jit-trace fails to compile (E0609 at
residual_call.rs:240/241/273).

Remove the vestigial per-frame propagation. The multi-frame build path is
PYRE_FBW_MULTIFRAME gated (default off); no behavior change.

check.py: dynasm 303/303, cranelift 303/303, wasm 300/300.

Assisted-by: Claude
@coderabbitai

coderabbitai Bot commented Jul 24, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 84d49125-d2ec-458e-b2de-4af02eb9ede8

📥 Commits

Reviewing files that changed from the base of the PR and between 80d590b and 5fb7a11.

📒 Files selected for processing (1)
  • pyre/pyre-jit-trace/src/jitcode_dispatch/residual_call.rs

Walkthrough

Multi-frame blackhole construction in the residual-call path no longer copies or overrides last_caught_exception_value while rebuilding the MIFrameStack.

Changes

Residual-call exception state

Layer / File(s) Summary
Preserve per-frame exception state
pyre/pyre-jit-trace/src/jitcode_dispatch/residual_call.rs
Intermediate and innermost MIFrame values are used without propagating or mutating last_caught_exception_value.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

I’m a small rabbit hopping through the frame,
No caught exception copied just the same.
Each blackhole keeps its state in view,
The innermost frame stays honest too.
Hop, hop—clean bookkeeping through!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the change: removing stale last_caught_exception_value propagation in the fbw residual-call path.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-763-last-caught-build

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

🤖 Codex parity review

Static analysis of this diff vs the local RPython/PyPy sources (commit 5fb7a11).
Updated: 2026-07-24T06:29:31.733Z

Files in the reviewed diff
pyre/pyre-jit-trace/src/jitcode_dispatch/residual_call.rs

1. Regressions to PyPy parity introduced by this patch

None.

2. Other mismatches introduced by this patch

None.

3. Pre-existing mismatches (already present before this patch)

None.

4. Structural adaptations

None.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant