Python 3.8 segfault: CField_Type does not implement tp_traverse
Created originally on Bitbucket by heimes (Christian Heimes)
The CPython bug https://bugs.python.org/issue38006 describes a segfault on Python 3.8b4 that seems to be caused by a problem in cffi and triggered by the new vector call feature. The segfault occurs when Python shuts down and GC clears weak references
The CFieldObject object of CField_Type can hold a CTypeDescrObject object in its cf_type slot. This turns a CFieldObject into a container object. All container objects must implement GC protocol (Py_TPFLAGS_HAVE_GC, tp_traverse, tp_clear). Victor’s comment https://bugs.python.org/issue38006#msg351037 goes into more details.