mirror of https://github.com/python/cpython
bpo-38631: Avoid Py_FatalError() in _memory_release() (GH-18214)
If the export count is negative, _memory_release() now raises a SystemError and returns -1, rather than calling Py_FatalError() which aborts the process.
This commit is contained in:
parent
a94c6b61aa
commit
47ee8a6063
|
@ -1048,7 +1048,8 @@ _memory_release(PyMemoryViewObject *self)
|
|||
return -1;
|
||||
}
|
||||
|
||||
Py_FatalError("_memory_release(): negative export count");
|
||||
PyErr_SetString(PyExc_SystemError,
|
||||
"_memory_release(): negative export count");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue