[issue31165] null pointer deref and segfault in list_slice (listobject.c:455)

STINNER Victor report at bugs.python.org
Fri Oct 6 16:12:48 EDT 2017


STINNER Victor <victor.stinner at gmail.com> added the comment:

"Maybe we should prevent collection of garbage with circular references (that has __del__() or weakref callbacks) from PyObject_GC_New()?"

That would be a major change in the garbage collector. I would prefer to not touch the GC, any change can introduce a complex regression.

Running the GC when an object is allocated makes sense to me. It's to reclaim memory, and prevent a MemoryError which would only be caused by "missed GC".

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31165>
_______________________________________


More information about the Python-bugs-list mailing list