summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2008-09-03 18:34:34 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2008-09-03 18:34:34 (GMT)
commit658fad8aae60e6c25a102fb56884bf66577366f8 (patch)
tree641c4687bd0227b36f37fc9d1014358857b27df1 /Python/ceval.c
parent338f5786eac83f473bcdde27fea6280c762fd92d (diff)
downloadcpython-658fad8aae60e6c25a102fb56884bf66577366f8.zip
cpython-658fad8aae60e6c25a102fb56884bf66577366f8.tar.gz
cpython-658fad8aae60e6c25a102fb56884bf66577366f8.tar.bz2
Issue #3697: "Fatal Python error: Cannot recover from stack overflow"
could be easily encountered under Windows in debug mode when exercising the recursion limit checking code, due to bogus handling of recursion limit when USE_STACKCHEK was enabled. Reviewed by Amaury Forgeot d'Arc on IRC.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 42df3cb..dc4276b 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -471,6 +471,7 @@ _Py_CheckRecursiveCall(char *where)
return -1;
}
#endif
+ _Py_CheckRecursionLimit = recursion_limit;
if (tstate->recursion_critical)
/* Somebody asked that we don't check for recursion. */
return 0;
@@ -489,7 +490,6 @@ _Py_CheckRecursiveCall(char *where)
where);
return -1;
}
- _Py_CheckRecursionLimit = recursion_limit;
return 0;
}