Commit c9314d9e authored by Benjamin Peterson's avatar Benjamin Peterson

don't run frame if it has no stack (closes #17669)

parent cd514cf1
...@@ -12,6 +12,8 @@ What's New in Python 3.3.2? ...@@ -12,6 +12,8 @@ What's New in Python 3.3.2?
Core and Builtins Core and Builtins
----------------- -----------------
- Issue #17669: Fix crash involving finalization of generators using yield from.
- Issue #17619: Make input() check for Ctrl-C correctly on Windows. - Issue #17619: Make input() check for Ctrl-C correctly on Windows.
- Issue #17610: Don't rely on non-standard behavior of the C qsort() function. - Issue #17610: Don't rely on non-standard behavior of the C qsort() function.
......
...@@ -178,7 +178,7 @@ gen_yf(PyGenObject *gen) ...@@ -178,7 +178,7 @@ gen_yf(PyGenObject *gen)
PyObject *yf = NULL; PyObject *yf = NULL;
PyFrameObject *f = gen->gi_frame; PyFrameObject *f = gen->gi_frame;
if (f) { if (f && f->f_stacktop) {
PyObject *bytecode = f->f_code->co_code; PyObject *bytecode = f->f_code->co_code;
unsigned char *code = (unsigned char *)PyBytes_AS_STRING(bytecode); unsigned char *code = (unsigned char *)PyBytes_AS_STRING(bytecode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment