[issue24469] Py2.x int free list can grow without bounds

2016-11-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset fd0842f34602 by Serhiy Storchaka in branch '2.7': Issue #24469: Fixed memory leak caused by int subclasses without overridden https://hg.python.org/cpython/rev/fd0842f34602 -- nosy: +python-dev ___ Python

[issue24469] Py2.x int free list can grow without bounds

2016-11-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue24469] Py2.x int free list can grow without bounds

2016-11-28 Thread Guido van Rossum
Guido van Rossum added the comment: OK, SGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue24469] Py2.x int free list can grow without bounds

2016-11-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It seems to me, that all builtin and extension types set tp_free to PyObject_Del, PyObject_GC_Del, or 0. The int class is the only exception. int_free() was introduced in 200559fcc664: > Make sure that tp_free frees the int the same way as tp_dealloc would.

[issue24469] Py2.x int free list can grow without bounds

2015-06-19 Thread Guido van Rossum
Guido van Rossum added the comment: (1) Just look at the examples of other builtin types with a similar structure but no free_list. (2) I guess the intention is for classes that subclass int to also override tp_alloc. Note that much of this code is written pretty much assuming that subclasses

[issue24469] Py2.x int free list can grow without bounds

2015-06-19 Thread Stefan Behnel
Stefan Behnel added the comment: > 1) The intended solution is to require that int subclasses override tp_free. In the way I showed? By calling either PyObject_GC_Del() or PyObject_Del() directly? I'll happily do that (Py2.7 and Py2 "int" being dead ends makes that pretty future proof), but it's

[issue24469] Py2.x int free list can grow without bounds

2015-06-19 Thread Guido van Rossum
Guido van Rossum added the comment: 1) The intended solution is to require that int subclasses override tp_free. 2) I don't see any constructors that don't call PyInt_FromLong() -- what am I missing? -- ___ Python tracker

[issue24469] Py2.x int free list can grow without bounds

2015-06-19 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue24469] Py2.x int free list can grow without bounds

2015-06-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Apparently, this is because of 200559fcc664. The fix is weird, though: why duplicate code instead of moving it into tp_free? I'd rather let Guido and Barry discuss this, I'm not willing to touch the 2.x int type anymore. -- nosy: +barry, gvanrossum _

[issue24469] Py2.x int free list can grow without bounds

2015-06-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Now that's weird. Why is the current int_free() doing the same as int_dealloc()? Because some people call tp_free directly? -- ___ Python tracker _

[issue24469] Py2.x int free list can grow without bounds

2015-06-19 Thread Stefan Behnel
Changes by Stefan Behnel : -- nosy: +pitrou, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue24469] Py2.x int free list can grow without bounds

2015-06-18 Thread Stefan Behnel
New submission from Stefan Behnel: A Cython user noticed a memory leak when C-inheriting from "int". http://thread.gmane.org/gmane.comp.python.cython.devel/15689 The Cython code to reproduce this is simply this: cdef class ExtendedInt(int): pass for j in xrange(1000): Ext