[issue26718] super.__init__ leaks memory if called multiple times

2016-04-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 450f36750cb9 by Serhiy Storchaka in branch '3.5': Issue #26718: super.__init__ no longer leaks memory if called multiple times. https://hg.python.org/cpython/rev/450f36750cb9 New changeset 4680438f486f by Serhiy Storchaka in branch '2.7': Issue

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: super_init_leaks_2.patch LGTM. -- ___ Python tracker ___ ___

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added more comments as suggested by Guido. -- Added file: http://bugs.python.org/file42447/super_init_leaks_2.patch ___ Python tracker

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: super_init_leaks.patch LGTM, it fixes. I confirm that the patch fixes the refleak. I checked with: $ ./python -m test -R 3:3 test_super -- ___ Python tracker

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. -- keywords: +patch stage: -> patch review type: behavior -> resource usage Added file: http://bugs.python.org/file42445/super_init_leaks.patch ___ Python tracker

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-12 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-12 Thread Guido van Rossum
Guido van Rossum added the comment: Do #1. --Guido (mobile) On Apr 11, 2016 11:31 PM, "Serhiy Storchaka" wrote: > > Serhiy Storchaka added the comment: > > Possible solutions: > > 1. Correctly decref old values. > 2. Raise an exception if super.__init__ is caled

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Possible solutions: 1. Correctly decref old values. 2. Raise an exception if super.__init__ is caled multiple times. 3. Remove super.__init__ and add super.__new__. What is more preferable? -- ___ Python tracker

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-11 Thread Guido van Rossum
Guido van Rossum added the comment: Actually, the refcount bug is still a bug. -- resolution: not a bug -> status: closed -> open ___ Python tracker ___

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-11 Thread Brett Cannon
Brett Cannon added the comment: Based on Guido's feedback and the fact that this isn't documented usage of super() and hence no promises to not re-initialize, I'm closing as "not a bug". Sorry, Kevin. -- resolution: -> not a bug status: open -> closed

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-09 Thread Guido van Rossum
Guido van Rossum added the comment: Any uses of super() beyond the documented idioms are uninteresting, except they should not be usable as crash or DoS vectors. -- ___ Python tracker

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If super used __new__ instead of __init__, this issue probably wouldn't arise. I'm surprised that super is subclassable. -- nosy: +gvanrossum, serhiy.storchaka ___ Python tracker

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-08 Thread SilentGhost
Changes by SilentGhost : -- nosy: +brett.cannon type: -> behavior versions: +Python 3.5 ___ Python tracker ___

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-08 Thread Kevin Modzelewski
New submission from Kevin Modzelewski: The super() __init__ function fills in the fields of a super object without checking if they were already set. If someone happens to call __init__ again, the previously-set references will end up getting forgotten and leak memory. For example: import