summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-11-24 21:33:01 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-11-24 21:33:01 (GMT)
commitf7d199ff329f0cb68f367c7aa169e058b2ab50f4 (patch)
treefd33432812139614d49b9c45c47994231c75d96c /Python
parentb3c5dc912daaec0f1f64dd05f5e49bfe9755fdb9 (diff)
downloadcpython-f7d199ff329f0cb68f367c7aa169e058b2ab50f4.zip
cpython-f7d199ff329f0cb68f367c7aa169e058b2ab50f4.tar.gz
cpython-f7d199ff329f0cb68f367c7aa169e058b2ab50f4.tar.bz2
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.
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 83296f6..d5172b9 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;
}