[issue3611] invalid exception context

Amaury Forgeot d'Arc report at bugs.python.org
Wed Aug 20 21:50:56 CEST 2008


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

The problem comes when PyErr_SetObject triggers garbage collection which
runs python code (finalizers...).

I could reproduce the crash several times, and each time garbage
collection was triggered by the normalization of the exception (the call
to PyEval_CallObject(exception, args)).

An obvious fix is to save exc_value near the "/* Implicit exception
chaining */" comment.

However, I fear that there are other places where exc_value is reset,
and "exception chaining" may break in subtle ways.

----------
nosy: +amaury.forgeotdarc

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3611>
_______________________________________


More information about the Python-bugs-list mailing list