Commit 87dd1433 authored by Serhiy Storchaka's avatar Serhiy Storchaka

Fixed possible abort in ceval loop if _PyUnicode_FromId() fails.

Every opcode should end with DISPATCH() or goto error.
parents dc102381 660d8405
...@@ -2140,7 +2140,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag) ...@@ -2140,7 +2140,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
else { else {
PyObject *build_class_str = _PyUnicode_FromId(&PyId___build_class__); PyObject *build_class_str = _PyUnicode_FromId(&PyId___build_class__);
if (build_class_str == NULL) if (build_class_str == NULL)
break; goto error;
bc = PyObject_GetItem(f->f_builtins, build_class_str); bc = PyObject_GetItem(f->f_builtins, build_class_str);
if (bc == NULL) { if (bc == NULL) {
if (PyErr_ExceptionMatches(PyExc_KeyError)) if (PyErr_ExceptionMatches(PyExc_KeyError))
...@@ -2652,7 +2652,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag) ...@@ -2652,7 +2652,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
/* do the same if locals() is not a dict */ /* do the same if locals() is not a dict */
PyObject *ann_str = _PyUnicode_FromId(&PyId___annotations__); PyObject *ann_str = _PyUnicode_FromId(&PyId___annotations__);
if (ann_str == NULL) { if (ann_str == NULL) {
break; goto error;
} }
ann_dict = PyObject_GetItem(f->f_locals, ann_str); ann_dict = PyObject_GetItem(f->f_locals, ann_str);
if (ann_dict == NULL) { if (ann_dict == NULL) {
......
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