diff options
-rw-r--r-- | Misc/NEWS | 2 | ||||
-rw-r--r-- | Objects/genobject.c | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -10,6 +10,8 @@ What's New in Python 3.4.0 Alpha 1? Core and Builtins ----------------- +- Issue #17669: Fix crash involving finalization of generators using yield from. + - Issue #14439: Python now prints the traceback on runpy failure at startup. - Issue #17469: Fix _Py_GetAllocatedBlocks() and sys.getallocatedblocks() diff --git a/Objects/genobject.c b/Objects/genobject.c index 597aed3..016bfa2 100644 --- a/Objects/genobject.c +++ b/Objects/genobject.c @@ -178,7 +178,7 @@ gen_yf(PyGenObject *gen) PyObject *yf = NULL; PyFrameObject *f = gen->gi_frame; - if (f) { + if (f && f->f_stacktop) { PyObject *bytecode = f->f_code->co_code; unsigned char *code = (unsigned char *)PyBytes_AS_STRING(bytecode); |