[issue14507] Segfault with deeply nested starmap calls

Kristján Valur Jónsson report at bugs.python.org
Sun Apr 15 21:47:23 CEST 2012


Kristján Valur Jónsson <kristjan at ccpgames.com> added the comment:

> There are other crashers we choose to ignore (involving gc.getreferrers, > bytecode hacks, ctypes, etc).  I think this should go in that category
> and I would be happy to add a note to that effect in the docs for tertools.

Yes, including my previous example with repr()
a = None
for i in range(100000):
    a = {1: a}
repr(a)

This is a case where care has been taken for lists, tuples, but not dicts.  If we want to fix repr, the recursion checking shoudl probably go into PyObject_repr().  I'm not advocating for a fix, Just pointing out yet another way you can construct objects so that accessnig them will cause a crash.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14507>
_______________________________________


More information about the Python-bugs-list mailing list