[issue10391] obj2ast's error handling can lead to python crashing with a C-level assertion failure
report at bugs.python.org
Thu Nov 11 21:56:15 CET 2010
Dave Malcolm <dmalcolm at redhat.com> added the comment:
The attached patch:
- extends the ast error-handling selftest with code that triggers this crash (on unpatched code)
- fixes Parser/asdl_c.py to generate code using _PyUnicode_AS_STRING instead
- contains the generated changes to Python/Python-ast.c
FWIW, it's not clear to what extent _PyUnicode_AS_STRING is deprecated, Include/unicodeobject.h currently has:
*** This API is for interpreter INTERNAL USE ONLY and will likely
*** be removed or changed for Python 3.1.
but I hope it won't be, it's far too useful.
stage: -> patch review
Added file: http://bugs.python.org/file19572/py3k-issue-10391-fix-ast-error-handling.patch
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list