Repository navigation
Add a bridge-recursion overflow parity fixture - #728
Conversation
`pyre/bench/synth/bridge_recursion_overflow.py`: a tail-recursive exact-integer callee whose `acc * 2 + 1` overflows the machine int inside the frame the depth-1 bridge self-recursive inline lift (`PYRE_FBW_BRIDGE_REC_INLINE`, default on) inlines on a guard-failure bridge, so an overflow guard resumes inside that frame. The synthetic parity suite runs it byte-exact against CPython/PyPy on each backend. No `max-pypy-ratio` gate: with the lift on, this shape admits an abort that folds back to residual, so it is a correctness fixture, not a timing gate. Assisted-by: Claude
|
Warning Review limit reached
Next review available in: 41 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
🤖 Codex parity reviewStatic analysis of this diff vs the local RPython/PyPy sources (commit ee43c41). Files in the reviewed diff1. Regressions to PyPy parity introduced by this patchNone. 2. Other mismatches introduced by this patchNone. 3. Pre-existing mismatches (already present before this patch)None. 4. Structural adaptationsNone. |
Summary
Adds a synthetic parity fixture for the depth-1 bridge self-recursive inline
lift (
PYRE_FBW_BRIDGE_REC_INLINE, default on) landed in #704.#704's A/B was validated on
fib, which never overflows the machine int, so itnever exercised an overflow guard inside the bridge-inlined recursive frame.
This fixture closes that gap: a tail-recursive exact-integer callee whose
acc * 2 + 1crosses the machine-int boundary partway down the recursion, so aGuardNoOverflowresumes inside the frame the lift inlines on a guard-failurebridge. The synthetic parity suite runs it byte-exact against CPython/PyPy on
each backend, so a silent overflow-guard resume miscompile on that shape fails
the check.
No
# pyre-check: max-pypy-ratio=gate: with the lift on, this exact shapeadmits an abort that folds back to residual (
loops_aborted0→6 vs the residualpath's single clean bridge), so it is perf-neutral-to-negative — a correctness
fixture, not a timing gate.
Verification
check.py --backend dynasm --synthetic-pattern bridge_recursion_overflow.py:PASS.
check.py --backend cranelift ...: PASS.loops_aborted=6with the lift on vs1withPYRE_FBW_BRIDGE_REC_INLINE=0— the fixture exercises exactly the shape thelift admits.
🤖 Generated with Claude Code