Message231311
Thank you for your report Chris.
PyObject_REPR() is used only in Python/compile.c just before calling Py_FatalError(). So refcount leaks doesn't matter in these cases.
PyObject_REPR() is expanded to deprecated _PyUnicode_AsString which is not defined if Py_LIMITED_API is defined. So it is unlikely that third-party code uses it. We can just remove this macro in 3.5.
There are other bugs in formatting fatal error messages where PyObject_REPR() is used. PyBytes_AS_STRING() is called for unicode objects. Definitely this branch of the code is rarely executed.
Here is a patch which expands PyObject_REPR() in Python/compile.c and replaces PyBytes_AS_STRING() with PyUnicode_AsUTF8(). In 3.5 we also should remove the PyObject_REPR macro definition. |
|
Date |
User |
Action |
Args |
2014-11-18 10:40:50 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, Chris.Colbert |
2014-11-18 10:40:50 | serhiy.storchaka | set | messageid: <1416307250.17.0.963940039948.issue22453@psf.upfronthosting.co.za> |
2014-11-18 10:40:50 | serhiy.storchaka | link | issue22453 messages |
2014-11-18 10:40:49 | serhiy.storchaka | create | |
|