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 nascheme
Recipients Mark.Shannon, christian.heimes, jdemeyer, lukasz.langa, methane, miss-islington, nascheme, pablogsal, petr.viktorin, pitrou, tim.peters, vstinner
Date 2019-09-30.02:08:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1569809285.16.0.229518544423.issue38006@roundup.psfhosted.org>
In-reply-to
Content
> We can have finalizer code running during delete_garbage().  That
> code should not have access to non-valid objects.  Weakrefs seem be
> a way to violate that.  handle_weakrefs() take care of some of them
> but it seems there are other issues.

I see that handle_weakrefs() calls _PyWeakref_ClearRef() and that
will clear the weakref even if it doesn't have callback.  So, I
think that takes care for the hole I was worried about.  I.e. a
__del__ method could have a weakref to an non-valid object.
However, because handle_weakrefs() will find that weakref, it will
have been cleared when the __del__ method executes.
History
Date User Action Args
2019-09-30 02:08:05naschemesetrecipients: + nascheme, tim.peters, pitrou, vstinner, christian.heimes, petr.viktorin, methane, lukasz.langa, Mark.Shannon, jdemeyer, pablogsal, miss-islington
2019-09-30 02:08:05naschemesetmessageid: <1569809285.16.0.229518544423.issue38006@roundup.psfhosted.org>
2019-09-30 02:08:05naschemelinkissue38006 messages
2019-09-30 02:08:05naschemecreate