[New-bugs-announce] [issue2045] defaultdict subclasses segfault with a bound method set as a default_factory

jason kirtland report at bugs.python.org
Thu Feb 7 23:35:31 CET 2008


New submission from jason kirtland:

Python 2.5.1 (r251:54863, May 23 2007, 16:25:53) 
[GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from collections import defaultdict
>>> class sub(defaultdict):
...     def __init__(self):
...         self.default_factory = self._factory
...     def _factory(self):
...         return []
... 
>>> s = sub()
>>> repr(s)
Segmentation fault

----------
components: Library (Lib)
messages: 62185
nosy: jek
severity: normal
status: open
title: defaultdict subclasses segfault with a bound method set as a default_factory
type: crash
versions: Python 2.5

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2045>
__________________________________


More information about the New-bugs-announce mailing list