diff options
author | Tomas R. <tomas.roun8@gmail.com> | 2025-04-11 23:05:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-12 05:05:03 +0800 |
commit | e6ef47ac229b5c4a62b9c907e4232e350db77ce3 (patch) | |
tree | e77131af668999620fa6d1acb093440f5baf3049 /Python | |
parent | deda47d6e18d61e982045b795e3599838823db6a (diff) | |
download | cpython-e6ef47ac229b5c4a62b9c907e4232e350db77ce3.tar.gz cpython-e6ef47ac229b5c4a62b9c907e4232e350db77ce3.zip |
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
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 8ab0c6318c1..e4a63ad9287 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -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); |