Steve Stagg <stest...@gmail.com> added the comment:
It looks like the segfault was fixed in https://github.com/python/cpython/commit/88c2cfd9ffbcfc43fd1364f2984852a819547d43 as part of https://bugs.python.org/issue41832. The code in this area of typeobject.c looks a bit different, now, but the backport seems simple? Simple testcase: #include <stdio.h> #include <Python.h> int main() { Py_Initialize(); PyStructSequence_Field fields[2] = { {NULL, NULL} }; PyStructSequence_Desc d = {"test", NULL, &fields[0], 0}; PyStructSequence_NewType(&d); Py_Finalize(); } Segfault reproducible on 3.8 and 3.9 ---------- nosy: +stestagg _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42083> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com