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.

Author arigo
Recipients
Date 2005-04-01.09:22:14
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
class X(types.ModuleType, str): pass
X('name')
-> segfault

This buggy subclassing goes through typeobject.c's checks because PyModuleObject looks exactly like a user-defined subclass of 'object': it has a PyObject_HEAD followed only by the dict, as specified by tp_dictoffset.

A fix would be to forbid any subclassing to move the tp_dictoffset of a non-heap type.
History
Date User Action Args
2007-08-23 14:30:39adminlinkissue1174712 messages
2007-08-23 14:30:39admincreate