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 Rhamphoryncus
Recipients Rhamphoryncus
Date 2008-06-13.05:14:50
SpamBayes Score 0.0475689
Marked as misclassified No
Message-id <>
1. MyRef is released from the module as part of shutdown
2. MyRef's subtype_dealloc DECREFs its dictptr (not clearing it, as
MyRef is dead and should be unreachable)
3. the dict DECREFs the Dummy (MyRef's target)
4. Dummy's subtype_dealloc calls PyObject_ClearWeakRefs to notify of its
5. the callback is called, with the dead MyRef as an argument
6. If MyRef's dict is accessed a segfault occurs.  Presumably just
calling the callback does enough damage to explain the segfault without
accessing MyRef's dict.

As I understand, a deleted weakref doesn't call its callback.  However,
subtype_dealloc doesn't call the base type's tp_dealloc until *after* it
does everything else.  Does it need a special case for weakrefs, or
maybe a tp_predealloc slot?
Date User Action Args
2008-06-13 05:14:52Rhamphoryncussetspambayes_score: 0.0475689 -> 0.0475689
recipients: + Rhamphoryncus
2008-06-13 05:14:52Rhamphoryncussetspambayes_score: 0.0475689 -> 0.0475689
messageid: <>
2008-06-13 05:14:51Rhamphoryncuslinkissue3100 messages
2008-06-13 05:14:50Rhamphoryncuscreate