This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: defaultdict subclasses segfault with a bound method set as a default_factory
Type: crash Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: amaury.forgeotdarc Nosy List: amaury.forgeotdarc, jek
Priority: normal Keywords:

Created on 2008-02-07 22:35 by jek, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg62185 - (view) Author: jason kirtland (jek) Date: 2008-02-07 22:35
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
msg62188 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-02-08 00:58
Committed r60663 in trunk. Thanks for the report!
Will backport to the 2.5 branch
msg62190 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-02-08 01:06
Committed r60664 for the coming 2.5.2.
History
Date User Action Args
2022-04-11 14:56:30adminsetgithub: 46321
2008-02-08 01:06:16amaury.forgeotdarcsetstatus: pending -> closed
messages: + msg62190
2008-02-08 00:58:05amaury.forgeotdarcsetmessages: + msg62188
2008-02-07 23:55:33amaury.forgeotdarcsetstatus: open -> pending
assignee: amaury.forgeotdarc
resolution: fixed
nosy: + amaury.forgeotdarc
2008-02-07 22:35:31jekcreate