You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
take_ownership may erroneously clear MemoryError exceptions #131173
take_ownership clears any MemoryError exceptions when getting the previous frame fails (even if they were not raised by the call to _PyFrame_GetFrameObject):
I think we should save and restore the exception around the call to _PyFrame_GetFrameObject(prev). Something like:
PyObject*exc=PyErr_GetRaisedException();
PyFrameObject*back=_PyFrame_GetFrameObject(prev);
if (back==NULL) {
/* Memory error here. */assert(PyErr_ExceptionMatches(PyExc_MemoryError));
/* Nothing we can do about it */PyErr_Clear();
}
else {
f->f_back= (PyFrameObject*)Py_NewRef(back);
}
PyErr_SetRaisedException(exc);
Activity
pythongh-131173: Improve exception handling during take_ownership pro…
gh-131173: Improve exception handling during take_ownership processing (