Bug report
Bug description:
ceval.c: Missing PyErr_NoMemory in _PyObjectArray_FromStackRefArray + PyEval_GetLocals NULL deref
Summary
_PyObjectArray_FromStackRefArray(line 1112):PyMem_Mallocreturns NULL without exception. Affects ~10 vectorcall functions โ SystemError.PyEval_GetLocals(line 2622):_PyFrame_GetFrameObjectcan return NULL, immediately dereferenced โ segfault.Fix
- Add
PyErr_NoMemory()afterPyMem_Mallocfailure.- Add NULL check after
_PyFrame_GetFrameObject.
But the second _PyFrame_GetFrameObject issue is already resolved by #146124
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response