Message175203
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 |
|
Date |
User |
Action |
Args |
2012-11-08 23:05:10 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc |
2012-11-08 23:05:10 | amaury.forgeotdarc | set | messageid: <1352415910.77.0.640632287013.issue16445@psf.upfronthosting.co.za> |
2012-11-08 23:05:10 | amaury.forgeotdarc | link | issue16445 messages |
2012-11-08 23:05:10 | amaury.forgeotdarc | create | |
|