mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
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
1 changed files with 2 additions and 1 deletions
|
@ -1048,7 +1048,8 @@ _memory_release(PyMemoryViewObject *self)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Py_FatalError("_memory_release(): negative export count");
|
PyErr_SetString(PyExc_SystemError,
|
||||||
|
"_memory_release(): negative export count");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue