[New-bugs-announce] [issue26718] super.__init__ leaks memory if called multiple times

Kevin Modzelewski report at bugs.python.org
Fri Apr 8 21:02:03 EDT 2016

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 sys
sp = super(int, 1)
for i in range(100000):
  super.__init__(sp, float, 1.0)

components: Interpreter Core
messages: 263053
nosy: Kevin Modzelewski
priority: normal
severity: normal
status: open
title: super.__init__ leaks memory if called multiple times
versions: Python 2.7, Python 3.6

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list