[issue35408] Python3.7 crash in PyCFunction_New due to broken _PyObject_GC_TRACK

2018-12-05 Thread Enric Tejedor Saavedra
Enric Tejedor Saavedra added the comment: Hi Victor, Thank you for clarifying. If the call to PyCFunction_New is done from a C extension module, is it also necessary to call Py_Initialize()? -- ___ Python tracker <https://bugs.python.

[issue35408] Python3.7 crash in PyCFunction_New due to broken _PyObject_GC_TRACK

2018-12-04 Thread Enric Tejedor Saavedra
New submission from Enric Tejedor Saavedra : Attached is a reproducer that calls PyCFunction_New. The reproducer runs normally with Python 3.6.5, but it crashes with Python 3.7.1. The reason seems to be that the _PyObject_GC_TRACK macro ends up being called and it is broken in Python3.7. A