From f7d199ff329f0cb68f367c7aa169e058b2ab50f4 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 24 Nov 2016 22:33:01 +0100 Subject: Fix _PyGen_yf() Issue #28782: Fix a bug in the implementation ``yield from`` when checking if the next instruction is YIELD_FROM. Regression introduced by WORDCODE (issue #26647). Reviewed by Serhiy Storchaka and Yury Selivanov. --- Python/ceval.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Python/ceval.c') diff --git a/Python/ceval.c b/Python/ceval.c index 83296f637f..d5172b9631 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -2043,6 +2043,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag) f->f_stacktop = stack_pointer; why = WHY_YIELD; /* and repeat... */ + assert(f->f_lasti >= (int)sizeof(_Py_CODEUNIT)); f->f_lasti -= sizeof(_Py_CODEUNIT); goto fast_yield; } -- cgit v1.2.1