[issue32322] Heap type with Py_TPFLAGS_HAVE_GC leads to segfault due to not incrementing type object refcout in PyObject_GC_New

2021-06-15 Thread Rostislav Kondratenko
Rostislav Kondratenko added the comment: Hello, I don't have that code, as I worked around that issue at the time. I checked with my project, using PyObject_GC_New works fine. It seems that since then the issue has been fixed at some point since 2017. Either that or I misinterpreted what

[issue32322] Heap type with Py_TPFLAGS_HAVE_GC leads to segfault due to not incrementing type object refcout in PyObject_GC_New

2017-12-14 Thread Rostislav Kondratenko
New submission from Rostislav Kondratenko <gros...@gmail.com>: If one creates a type with both Py_TPFLAGS_HAVE_GC and Py_TPFLAGS_HEAPTYPE set and implemented, one has to create instances with PyObject_GC_New() per current docs: https://docs.python.org/3.7/c-api/gcsupport.html . H