diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2016-11-24 22:33:01 +0100 |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2016-11-24 22:33:01 +0100 |
| commit | d27f18c0fd746ef7078a84dfe0fcbfa18d43d0c8 (patch) | |
| tree | 935f96200a797190226bcbcc2948c2926f964711 /Python | |
| parent | cf178ba1b91041fc609c76c1d28df88b12058913 (diff) | |
| download | cpython-d27f18c0fd746ef7078a84dfe0fcbfa18d43d0c8.tar.gz | |
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.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |
