[issue3611] invalid exception context

STINNER Victor report at bugs.python.org
Wed Aug 20 23:58:04 CEST 2008


STINNER Victor <haypo at users.sourceforge.net> added the comment:

Great job amaury! So in ceval, here is the block responsible to clear 
the execution informations:

Index: Python/ceval.c
===================================================================
--- Python/ceval.c      (révision 65915)
+++ Python/ceval.c      (copie de travail)
@@ -2453,11 +2453,6 @@

                        if (b->b_type == EXCEPT_HANDLER) {
                                UNWIND_EXCEPT_HANDLER(b);
-                               if (why == WHY_EXCEPTION) {
-                                       Py_CLEAR(tstate->exc_type);
-                                       Py_CLEAR(tstate->exc_value);
-                                       
Py_CLEAR(tstate->exc_traceback);
-                               }
                                continue;
                        }
                        UNWIND_BLOCK(b);

Without these 5 lines, the bug disappears and it looks (i tried few 
tests) that CPython is still ok.

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


More information about the Python-bugs-list mailing list