This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Kevin Modzelewski
Recipients Kevin Modzelewski
Date 2016-04-09.01:02:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1460163723.35.0.208266777223.issue26718@psf.upfronthosting.co.za>
In-reply-to
Content
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 sys
print(sys.gettotalrefcount())
sp = super(int, 1)
for i in range(100000):
  super.__init__(sp, float, 1.0)
print(sys.gettotalrefcount())
History
Date User Action Args
2016-04-09 01:02:03Kevin Modzelewskisetrecipients: + Kevin Modzelewski
2016-04-09 01:02:03Kevin Modzelewskisetmessageid: <1460163723.35.0.208266777223.issue26718@psf.upfronthosting.co.za>
2016-04-09 01:02:03Kevin Modzelewskilinkissue26718 messages
2016-04-09 01:02:02Kevin Modzelewskicreate