This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author grahamd
Recipients grahamd
Date 2019-05-28.01:52:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1559008374.77.0.70293248511.issue37072@roundup.psfhosted.org>
In-reply-to
Content
The code:

#include <Python.h>

int
main(int argc, char *argv[])
{
    FILE *fp = NULL;
    PyObject *co = NULL;
    struct _node *n = NULL;
    const char * filename = "/dev/null";

    Py_Initialize();

    fprintf(stderr, "START\n");

    fp = fopen(filename, "r");

    fprintf(stderr, "CALL PyParser_SimpleParseFile()\n");

    n = PyParser_SimpleParseFile(fp, filename, Py_file_input);

    fprintf(stderr, "CALL PyNode_Compile()\n");

    co = (PyObject *)PyNode_Compile(n, filename);

    fprintf(stderr, "DONE\n");

    Py_Finalize();

    return 0;
}

has worked fine since Python 2.3 (and maybe earlier) through Python 3.7, but now crashes in Python 3.8.

It crashes in PyNode_Compile().

START
CALL PyParser_SimpleParseFile()
CALL PyNode_Compile()
Segmentation fault: 11

Although it is part of the public interface of compile.h, the PyNode_Compile() seems never to actually be called anywhere in Python itself, and perhaps isn't even covered by tests. So if Python 3.8 internal changes mean this function implementation needs to be changed, that fact may have been missed.
History
Date User Action Args
2019-05-28 01:52:54grahamdsetrecipients: + grahamd
2019-05-28 01:52:54grahamdsetmessageid: <1559008374.77.0.70293248511.issue37072@roundup.psfhosted.org>
2019-05-28 01:52:54grahamdlinkissue37072 messages
2019-05-28 01:52:54grahamdcreate