Message249628
The namereplace error handler introduced in Python 3.5 doesn't handle correctly PyCapsule_Import() failure. If the function raises an exception, the PyCodec_NameReplaceErrors() function must return NULL.
I see that the code correctly handle the case where PyCodec_NameReplaceErrors() failed, but it doesn't clear the exception.
Attached patch changes PyCodec_NameReplaceErrors() to return immediatly NULL if PyCodec_NameReplaceErrors() failed.
Or should we log the exception (PyErr_WriteUnraisable) and then clear it? PyErr_WriteUnraisable is usually used in corner case when it's impossible to report bugs to the function caller. |
|
Date |
User |
Action |
Args |
2015-09-03 10:49:48 | vstinner | set | recipients:
+ vstinner, serhiy.storchaka |
2015-09-03 10:49:48 | vstinner | set | messageid: <1441277388.17.0.438973463566.issue24993@psf.upfronthosting.co.za> |
2015-09-03 10:49:48 | vstinner | link | issue24993 messages |
2015-09-03 10:49:48 | vstinner | create | |
|