Message353524
> 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. |
|
Date |
User |
Action |
Args |
2019-09-30 02:08:05 | nascheme | set | recipients:
+ nascheme, tim.peters, pitrou, vstinner, christian.heimes, petr.viktorin, methane, lukasz.langa, Mark.Shannon, jdemeyer, pablogsal, miss-islington |
2019-09-30 02:08:05 | nascheme | set | messageid: <1569809285.16.0.229518544423.issue38006@roundup.psfhosted.org> |
2019-09-30 02:08:05 | nascheme | link | issue38006 messages |
2019-09-30 02:08:05 | nascheme | create | |
|