mirror of
https://github.com/python/cpython.git
synced 2025-08-27 12:16:04 +00:00
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:
parent
deda47d6e1
commit
e6ef47ac22
3 changed files with 14 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue