Commits

Mark Shannon  committed d082aa4 Draft

Ensure interpreter loop sees exceptions in GEN_XXX instructions

  • Participants
  • Parent commits 26600a0

Comments (0)

Files changed (1)

File Python/ceval.c

                 Py_DECREF(w);
                 PyErr_SetString(PyExc_SystemError,
                     "generator required");
+                x = NULL;
                 goto on_error;
             }
             PyGen_Clear((PyGenObject *)w);
                     Py_DECREF(w);
                     PyErr_SetString(PyExc_ValueError,
                                     "generator already executing");
+                    x = NULL;
                     break;
                 }
                 gen_frame = gen->gi_frame;
                     Py_XDECREF(v);
                     Py_DECREF(w);
                     PyErr_SetNone(PyExc_StopIteration);
+                    x = NULL;
                     break;
                 }
                 gen = (PyGenObject *)w;