-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Description
Bug report
Bug description:
Possible interpreter crash condition was found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
run_eval_code_obj is called with globals dict passed as pointer without NULL check and that may cause segmentation fault in
PyEval_EvalCode->_PyEval_BuiltinsFromGlobals->PyDict_GetItemWithError line 2272 in PyDict_Check(op).
Some functions, for example, _run_script or builtin_eval_impl have globals NULL check.
Other, like PyRun_SimpleStringFlags,
PyRun_InteractiveOneObjectEx or PyRun_FileExFlags just use the pointer from the PyObject struct.
For my understanding the globals dict should always be present and it is an error condition, when it is NULL.
And no one encounted with such faults, so the patch will have cosmetic effect (is on the way).
CPython versions tested on:
3.10
Operating systems tested on:
Linux