Message120967
In various places within the generated Python/Python-ast.c, error handling generates a repr() and raises exceptions accordingly.
Currently in py3k the generated code uses PyBytes_AS_STRING() on the repr. My understanding is that repr() should be a PyUnicodeObject, not a PyBytesObject. This seems to be unchanged from r63682, which was a mass-change of PyString to PyBytes from 2 years ago.
This leads to a python crashing with an assertion failure:
test_compile_ast (__main__.TestSpecifics) ... python: Python/Python-ast.c:5835: obj2ast_expr: Assertion `((((((PyObject*)(tmp))->ob_type))->tp_flags & ((1L<<27))) != 0)' failed.
when invoking compile() on certain (malformed) trees of ast objects. |
|
Date |
User |
Action |
Args |
2010-11-11 20:53:43 | dmalcolm | set | recipients:
+ dmalcolm |
2010-11-11 20:53:43 | dmalcolm | set | messageid: <1289508823.86.0.760663346752.issue10391@psf.upfronthosting.co.za> |
2010-11-11 20:53:42 | dmalcolm | link | issue10391 messages |
2010-11-11 20:53:41 | dmalcolm | create | |
|