-
Notifications
You must be signed in to change notification settings - Fork 19
Two blackhole-resume double-apply shapes, and a ratio gate that fails on a non-measurement #1095
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
881e98e
264bd3f
596583d
425ecfa
487c7ff
863383e
a8673ce
5e66b71
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| bridges_compiled=6 | ||
| bridges_compiled=5 | ||
| descr_set_absent=0 | ||
| descr_set_ambiguous=0 | ||
| descr_set_stale_absent=0 | ||
| fbw_rolled_back_with_effects=0 | ||
| field_pos_attached_misplaced=0 | ||
| field_pos_spec_misplaced=0 | ||
| guard_failures=686 | ||
| guard_failures=647 | ||
| internal_compile_panics=0 | ||
| loops_aborted=0 | ||
| loops_compiled=5 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| bridges_compiled=6 | ||
| bridges_compiled=5 | ||
| descr_set_absent=0 | ||
| descr_set_ambiguous=0 | ||
| descr_set_stale_absent=0 | ||
| fbw_rolled_back_with_effects=0 | ||
| field_pos_attached_misplaced=0 | ||
| field_pos_spec_misplaced=0 | ||
| guard_failures=686 | ||
| guard_failures=647 | ||
| internal_compile_panics=0 | ||
| loops_aborted=0 | ||
| loops_compiled=5 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| bridges_compiled=6 | ||
| bridges_compiled=5 | ||
| descr_set_absent=0 | ||
| descr_set_ambiguous=0 | ||
| descr_set_stale_absent=0 | ||
| fbw_rolled_back_with_effects=0 | ||
| field_pos_attached_misplaced=0 | ||
| field_pos_spec_misplaced=0 | ||
| guard_failures=686 | ||
| guard_failures=647 | ||
| internal_compile_panics=0 | ||
| loops_aborted=0 | ||
| loops_compiled=5 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| bridges_compiled=5 | ||
| bridges_compiled=4 | ||
| descr_set_absent=0 | ||
| descr_set_ambiguous=0 | ||
| descr_set_stale_absent=0 | ||
| fbw_rolled_back_with_effects=0 | ||
| field_pos_attached_misplaced=0 | ||
| field_pos_spec_misplaced=0 | ||
| guard_failures=1009 | ||
| guard_failures=809 | ||
| internal_compile_panics=0 | ||
| loops_aborted=0 | ||
| loops_compiled=4 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| bridges_compiled=5 | ||
| bridges_compiled=4 | ||
| descr_set_absent=0 | ||
| descr_set_ambiguous=0 | ||
| descr_set_stale_absent=0 | ||
| fbw_rolled_back_with_effects=0 | ||
| field_pos_attached_misplaced=0 | ||
| field_pos_spec_misplaced=0 | ||
| guard_failures=1009 | ||
| guard_failures=809 | ||
| internal_compile_panics=0 | ||
| loops_aborted=0 | ||
| loops_compiled=4 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| bridges_compiled=5 | ||
| bridges_compiled=4 | ||
| descr_set_absent=0 | ||
| descr_set_ambiguous=0 | ||
| descr_set_stale_absent=0 | ||
| fbw_rolled_back_with_effects=0 | ||
| field_pos_attached_misplaced=0 | ||
| field_pos_spec_misplaced=0 | ||
| guard_failures=1009 | ||
| guard_failures=809 | ||
| internal_compile_panics=0 | ||
| loops_aborted=0 | ||
| loops_compiled=4 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| bridges_compiled=6 | ||
| bridges_compiled=5 | ||
| descr_set_absent=0 | ||
| descr_set_ambiguous=0 | ||
| descr_set_stale_absent=0 | ||
| fbw_rolled_back_with_effects=0 | ||
| field_pos_attached_misplaced=0 | ||
| field_pos_spec_misplaced=0 | ||
| guard_failures=1562 | ||
| guard_failures=1345 | ||
| internal_compile_panics=0 | ||
| loops_aborted=1 | ||
| loops_compiled=12 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| bridges_compiled=6 | ||
| bridges_compiled=5 | ||
| descr_set_absent=0 | ||
| descr_set_ambiguous=0 | ||
| descr_set_stale_absent=0 | ||
| fbw_rolled_back_with_effects=0 | ||
| field_pos_attached_misplaced=0 | ||
| field_pos_spec_misplaced=0 | ||
| guard_failures=1562 | ||
| guard_failures=1345 | ||
| internal_compile_panics=0 | ||
| loops_aborted=1 | ||
| loops_compiled=12 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| bridges_compiled=6 | ||
| bridges_compiled=5 | ||
| descr_set_absent=0 | ||
| descr_set_ambiguous=0 | ||
| descr_set_stale_absent=0 | ||
| fbw_rolled_back_with_effects=0 | ||
| field_pos_attached_misplaced=0 | ||
| field_pos_spec_misplaced=0 | ||
| guard_failures=1562 | ||
| guard_failures=1345 | ||
| internal_compile_panics=0 | ||
| loops_aborted=1 | ||
| loops_compiled=12 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -277,9 +277,12 @@ fn capture_vstack_mirror_image<Sym: WalkSym>( | |
| } | ||
| other => { | ||
| latchdbg!( | ||
| "origin={origin} mirror-slot {}/{} unresolved opref={opref:?} concrete={other:?}", | ||
| "origin={origin} mirror-slot {}/{} unresolved opref={opref:?} \ | ||
| concrete={other:?} pypc={} boxes={:?}", | ||
| slots.len(), | ||
| ctx.vstack_boxes.len(), | ||
| ctx.vstack_cur_pypc, | ||
| ctx.vstack_boxes, | ||
| ); | ||
| return None; | ||
| } | ||
|
|
@@ -4746,6 +4749,17 @@ pub(crate) fn dispatch_residual_call_iRd_kind<Sym: WalkSym>( | |
| // Without it the abort lands in the `Generic` catch-all and the | ||
| // `abort: force quasi-immut` counter stays at 0. | ||
| crate::state::note_force_quasi_immut_abort(); | ||
| // Stamp the abort coordinate at the raise point, the way the two | ||
| // kept-stack branch-guard raises do, so the flush gate cannot observe | ||
| // an UNRELATED prior abort. `abort_in_subwalk` is sticky for the whole | ||
| // trace attempt (`claim_abort_coordinate` only ever sets it), so an | ||
| // earlier inline sub-walk abort the walk RECOVERED from — the attempt | ||
| // discarded, the call residualized, the walk continued — leaves it true | ||
| // for every later abort. `flush_qmut_abort_state`'s gate then declines | ||
| // a root-frame qmut abort as though its pc named a callee jitcode, and | ||
| // the legacy replay re-runs the region on top of the residuals the walk | ||
| // already executed. | ||
| ctx.session.borrow_mut().abort_in_subwalk = ctx.fbw_mode.inline_subwalk; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When an inline subwalk abort is caught and residualized, AGENTS.md reference: AGENTS.md:L252-L254 Useful? React with 👍 / 👎. |
||
| return Err(DispatchError::ForceQuasiImmutable { pc: op.pc }); | ||
| } | ||
|
|
||
|
|
@@ -5870,19 +5884,21 @@ pub(crate) fn dispatch_residual_call_iIRd_kind<Sym: WalkSym>( | |
| // `GUARD_NOT_INVALIDATED`, so a rebind or a delete fails the loop instead of | ||
| // reaching a NameError, and a successful fold provably cannot raise. | ||
| // | ||
| // The gate is load-bearing because the fold INSTALLS the module dict's | ||
| // `version?` watcher, and that watcher is what makes a later bumping write | ||
| // in the same program abandon the walk with `ForceQuasiImmutable`. That | ||
| // abort resumes mid-expression off a latched operand mirror, and when one | ||
| // latched slot is unbound the flush declines to the legacy replay, which | ||
| // then REFUSES to re-deliver an in-flight FOR_ITER item once a body effect | ||
| // has committed — the iteration is dropped and its accumulator increment is | ||
| // silently lost. Lifting the gate to `DELETE_NAME`/`DELETE_GLOBAL` only | ||
| // (the implicit `del e` an `except X as e:` emits) reaches exactly that: | ||
| // `bench/synth/pickle_terminal_raise_resume` then prints 214 under the JIT | ||
| // against 216 interpreted, off one dropped iteration. Both halves of that | ||
| // chain — the unbound mirror slot and the silent drop the decline falls | ||
| // back to — have to be closed before the handler shape stops standing in. | ||
| // The gate stands on compile behaviour, not on correctness. The fold | ||
| // INSTALLS the module dict's `version?` watcher, and that watcher is what | ||
| // makes a later bumping write in the same program abandon the walk with | ||
| // `ForceQuasiImmutable` — so lifting the gate multiplies those aborts in | ||
| // handler-bearing module bodies. The three wrong-code shapes that used to | ||
| // ride on that (a dropped FOR_ITER iteration in | ||
| // `pickle_terminal_raise_resume`, and the two double-applies in | ||
| // `iter57/real_exception` and `exception_reentry_guard_finally_residual`) | ||
| // are closed: the first no longer reproduces, and the other two were the | ||
| // stale `abort_in_subwalk` this file now stamps at its own qmut raise plus | ||
| // the live-NULL mirror slot `reseed_vstack_from_shadow` now accepts. With | ||
| // the gate lifted the whole `bench/synth` corpus is output-correct; what | ||
| // still fails is `exception_reraise_tb_depth_jitstress` at 13.0x against | ||
| // its 4x pypy gate, and four benches' jit-stats move (most visibly | ||
| // `exception_reraise_tb_depth_hot`, `loops_aborted 0 -> 63`). | ||
| // | ||
| // The scan is whole-body, so one `try` anywhere in a module also charges | ||
| // every name access in it a live dict lookup (~83ns each, linear in the | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.