From dc61901dd2b1bcb5467ebc36ef35a51106d9b103 Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Sat, 22 Nov 2008 20:01:18 +0000 Subject: #3996: On Windows, PyOS_CheckStack is supposed to protect the interpreter from stack overflow. But doing this, it always crashes when the stack is nearly full. Reviewed by Martin von Loewis. Will backport to 2.6. --- Python/pythonrun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/pythonrun.c') diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 4ff70d85430..54f3c5784bd 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1755,7 +1755,7 @@ PyOS_CheckStack(void) EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) { int errcode = _resetstkoflw(); - if (errcode) + if (errcode == 0) { Py_FatalError("Could not reset the stack!"); } -- cgit v1.2.3