[New-bugs-announce] [issue28894] Memory leak in dict.pop()
Marius Gedminas
report at bugs.python.org
Wed Dec 7 09:47:11 EST 2016
New submission from Marius Gedminas:
Run the following script with Python 3.6.0rc1:
class O:
pass
o = O()
for n in range(20):
print(n)
o.x = 42
o.__dict__.pop('x', None)
You can observe the memory usage of the Python process growing exponentially.
E.g. in bash:
ulimit -v 1000000 # don't push other processes into swap please
python3.6 break.py
0
1
2
3
4
5
6
7
8
9
10
11
Traceback (most recent call last):
File "break.py", line 7, in <module>
o.x = 42
MemoryError
----------
components: Interpreter Core
messages: 282623
nosy: mgedmin
priority: normal
severity: normal
status: open
title: Memory leak in dict.pop()
versions: Python 3.6, Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28894>
_______________________________________
More information about the New-bugs-announce
mailing list