[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

Pablo Galindo Salgado report at bugs.python.org
Mon Sep 2 11:15:57 EDT 2019


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

I think the problem is that whatever is weak-referenced by the weak ref (CField_Type or similar) is not on the gc list. Because is not on the gc list, handle_weakrefs (https://github.com/python/cpython/blob/master/Modules/gcmodule.c#L1090) is not acting correctly on the weakreferences, clearing them before the tp_clear calls and therefore producing the crash.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38006>
_______________________________________


More information about the Python-bugs-list mailing list