Skip to content

Commit d25b2f3

Browse files
committed
W22: YIELD_FROM deopt — Alex explicit one-case bypass
Removes YIELD_FROM from isSupportedOpcode in builder.cpp so that functions containing the YIELD_FROM bytecode are skipped by the JIT and run via the interpreter fallback path. The W22 crash class (refcount-pass-init at n_in==0 generator-resume blocks, surfaced by the W32 --wiring fix) is therefore not reachable through compiled code. 5 architectural fix iterations (v1 OWNED / v2 per-reg / v3 per-reg no-add_copy / v3-clean-pydebug / v4-A BORROWED) did not converge on a clean repair: each candidate fixed Criterion 1 SIGABRT 134 but introduced a different failure mode (immortal-refcount underflow, 'live twice' assertion, SIGSEGV 139). Empirical symmetric test against the pre-R4 C++ baseline (5e981c5) confirmed the bug class is inherited from the original CinderX extraction — same immortal underflow surfaces in C++ refcount_insertion.cpp on the same falsifier. Per Alex L3076, the no-workarounds rule (feedback_no_workarounds.md 'always root-cause, never bail-out/deopt', extended 2026-04-22 by 'Quality > speed, always') is bypassed here under explicit author authority for THIS ONE CASE only. The rule STANDS for future cases. The bypass is marked-in-code with sourced + auditable attribution per gatekeeper L3076 review framing, so future readers see the override is not a silent carve-out. Functions that use YIELD_FROM run correctly via the interpreter path: pre-fix 'cannot compile … unsupported opcode' is the existing mechanism for this class, used by many other unsupported opcodes already. Compile-check: cmake --build of Python/jit_build/build PASSED clean (libphoenix_jit.a relinked). Per supervisor L3076 implementation directive after Alex L3076 authority bypass + gatekeeper L3076 conditional approve.
1 parent 4a01bfa commit d25b2f3

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Python/jit/hir/builder.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,16 @@ bool isSupportedOpcode(int opcode) {
262262
case UNPACK_EX:
263263
case UNPACK_SEQUENCE:
264264
case WITH_EXCEPT_START:
265-
case YIELD_FROM:
266265
case YIELD_VALUE:
267266
return true;
267+
// YIELD_FROM deopt: Alex 2026-04-23 W22 explicit one-case bypass of
268+
// feedback_no_workarounds.md ('always root-cause, never bail-out/deopt').
269+
// Refcount-pass-init n_in==0 generator-resume bug — JIT compilation of
270+
// YIELD_FROM hits an inherited CinderX defect (deopt-assertion / immortal
271+
// refcount underflow on resume) that 5 architectural fix iterations
272+
// could not resolve cleanly. Author authority bypass per Alex L3076 +
273+
// gatekeeper L3076. Functions containing YIELD_FROM fall back to the
274+
// interpreter (correct, slightly slower). RULE STANDS for future cases.
268275
default:
269276
break;
270277
}

0 commit comments

Comments
 (0)