New submission from Amaury Forgeot d'Arc: The script below segfaults cpython2.7. The cause is in BaseException_set_message(), which calls Py_XDECREF(self->message) and thus can call back into Python code with a dangling PyObject* pointer. Py_CLEAR should be used instead.
class Nasty(str): def __del__(self): del e.message e = ValueError(Nasty("msg")) e.args = () del e.message del e ---------- messages: 175203 nosy: amaury.forgeotdarc priority: normal severity: normal status: open title: SEGFAULT when deleting Exception.message type: crash _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16445> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com