diff Python/ceval.c @ 48986:22ab106e3186

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.
author Antoine Pitrou <solipsis@pitrou.net>
date Wed, 03 Sep 2008 18:34:34 +0000
parents c562c8dae49a
children 26518d41a186 ba8fe3a40a5b
line wrap: on
line diff
--- a/Python/ceval.c	Wed Sep 03 18:22:19 2008 +0000
+++ b/Python/ceval.c	Wed Sep 03 18:34:34 2008 +0000
@@ -471,6 +471,7 @@
 		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 @@
 			     where);
 		return -1;
 	}
-	_Py_CheckRecursionLimit = recursion_limit;
 	return 0;
 }