You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Activity
grahamd commentedon May 28, 2019
The code:
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.
grahamd commentedon May 28, 2019
FWIW, this was occurring on macOS. Not been able to test on other platforms.
encukou commentedon May 28, 2019
Looks like this is caused by: https://github.com/python/cpython/pull/12086/files#diff-4d35cf8992b795c5e97e9c8b6167cb34R787
PyAST_FromNodeObject doesn't ignore flags any more, so when PyNode_Compile passes NULL flags, it crashes.
(This is unfamiliar code for me; I won't have time to fix & test properly this week.)
vstinner commentedon May 28, 2019
I mark this issue as a release blocker.
gvanrossum commentedon May 28, 2019
OK, I'll look into this.
gvanrossum commentedon May 28, 2019
New changeset 77f0ed7 by Guido van Rossum in branch 'master':
bpo-37072: Fix crash in PyAST_FromNodeObject() when flags is NULL (bpo-13634)
77f0ed7