summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-08-20 23:23:34 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-08-20 23:23:34 (GMT)
commit6e7740c790bf41f520e304ec17abf79a5373b5cc (patch)
treed56ae0f5e5952ce1acae9e97372cd148c10e297b /Python
parent41e36676cd820ece16b9f8db07be8d541f264116 (diff)
downloadcpython-6e7740c790bf41f520e304ec17abf79a5373b5cc.zip
cpython-6e7740c790bf41f520e304ec17abf79a5373b5cc.tar.gz
cpython-6e7740c790bf41f520e304ec17abf79a5373b5cc.tar.bz2
apply a fix for #3611 where the current exception context was deleted with a generator causing a segfault
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 40ce038..3af0cef 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -2453,7 +2453,7 @@ fast_block_end:
if (b->b_type == EXCEPT_HANDLER) {
UNWIND_EXCEPT_HANDLER(b);
- if (why == WHY_EXCEPTION) {
+ if (why == WHY_EXCEPTION && !throwflag) {
Py_CLEAR(tstate->exc_type);
Py_CLEAR(tstate->exc_value);
Py_CLEAR(tstate->exc_traceback);