[issue8420] Objects/setobject.c contains unsafe code
Eugene Kapun
report at bugs.python.org
Mon Apr 19 00:25:48 CEST 2010
Eugene Kapun <abacabadabacaba at gmail.com> added the comment:
This code crashes python by using another bug in set_repr. This only affects py3k. This code relies on out-of-memory condition, so run it like:
$ (ulimit -v 65536 && python3 test.py)
Otherwise, it will eat all your free memory before crashing.
val = "a" * 10000
class big:
def __repr__(self):
return val
i = 16
while True:
repr(frozenset(big() for j in range(i)))
i = (i * 5) >> 2
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8420>
_______________________________________
More information about the Python-bugs-list
mailing list