[issue19835] Add a MemoryError singleton to fix an unlimited loop when the memory is exhausted

Antoine Pitrou report at bugs.python.org
Fri Nov 29 18:31:38 CET 2013


Antoine Pitrou added the comment:

> Under very low memory condition, PyErr_NoMemory() or
> PyErr_NormalizeException() enters an unlimited loop when the free list 
> of MemoryError becomes empty.

The real question is why the free list becomes empty.

Either way, I don't think a read-only singleton is a good idea. It may be simpler to call Py_FatalError in such cases.

----------
nosy: +neologix

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19835>
_______________________________________


More information about the Python-bugs-list mailing list