gh-132386: Fix a crash when passing a dict subclass to exec (GH-132412)
* Fix crash when passing a dict subclass to exec * Add news entry
This commit is contained in:
@@ -3312,6 +3312,8 @@ _PyEval_LoadGlobalStackRef(PyObject *globals, PyObject *builtins, PyObject *name
|
||||
_PyEval_FormatExcCheckArg(
|
||||
PyThreadState_GET(), PyExc_NameError,
|
||||
NAME_ERROR_MSG, name);
|
||||
*writeto = PyStackRef_NULL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
*writeto = PyStackRef_FromPyObjectSteal(res);
|
||||
|
||||
Reference in New Issue
Block a user