Message144704
Confirmed with default.
The problem is that the TextIOWrapper gets collected after the underlying BufferedRWPair has been cleared (tp_clear) by the garbage collector: when _PyIOBase_finalize() is called for the TextIOWrapper, it checks if the textio is closed, which indirectly checks if the underlying rwpair is closed:
"""
static PyObject *
bufferedrwpair_closed_get(rwpair *self, void *context)
{
return PyObject_GetAttr((PyObject *) self->writer, _PyIO_str_closed);
}
"""
Since self->writer has already been set to NULL by bufferedrwpair_clear(), PyObject_GetAttr() segfaults.
@Victor
Could you try the patch attached? |
|
Date |
User |
Action |
Args |
2011-09-30 20:35:44 | neologix | set | recipients:
+ neologix, amaury.forgeotdarc, pitrou, vsemionov |
2011-09-30 20:35:44 | neologix | set | messageid: <1317414944.52.0.8614325043.issue13070@psf.upfronthosting.co.za> |
2011-09-30 20:35:43 | neologix | link | issue13070 messages |
2011-09-30 20:35:43 | neologix | create | |
|