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 anthony shaw
Recipients anthony shaw
Date 2019-03-21.03:52:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1553140330.8.0.0322222584785.issue36386@roundup.psfhosted.org>
In-reply-to
Content
If for whatever reason, Py_Initialize() has not been run or failed to run, any call to Py_CompileStringFlags will call PyUnicode_DecodeFSDefault and the reference to interp will be NULL.

There is currently no null reference check in PyUnicode_DecodeFSDefaultAndSize which causes a segfault.

https://github.com/python/cpython/blob/master/Objects/unicodeobject.c#L3736-L3737 is the offending line.

It might be better to catch the null pointer and raise an unrecoverable error there?

Error: signal 11:
0   ceval-prof                          0x00000001066310f3 handler + 35
1   libsystem_platform.dylib            0x00007fff6adddb3d _sigtramp + 29
2   ???                                 0x0000000000000000 0x0 + 0
3   ceval-prof                          0x0000000106734536 PyUnicode_DecodeFSDefault + 38
4   ceval-prof                          0x0000000106879514 Py_CompileStringExFlags + 36
5   ceval-prof                          0x0000000106631280 main + 320
6   libdyld.dylib                       0x00007fff6abf2ed9 start + 1
History
Date User Action Args
2019-03-21 03:52:10anthony shawsetrecipients: + anthony shaw
2019-03-21 03:52:10anthony shawsetmessageid: <1553140330.8.0.0322222584785.issue36386@roundup.psfhosted.org>
2019-03-21 03:52:10anthony shawlinkissue36386 messages
2019-03-21 03:52:10anthony shawcreate