summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-11-22 20:01:18 +0000
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-11-22 20:01:18 +0000
commit58fcfe3db4473de51a8a57a63932e4c0ba8032d4 (patch)
tree223fa57ddf11c5015dfd5d121d3d46f358661535 /Python/pythonrun.c
parent91f7e6a95394e3118e312a38f8deb4c57839fcda (diff)
downloadcpython-58fcfe3db4473de51a8a57a63932e4c0ba8032d4.tar.gz
#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.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 4ff70d8543..54f3c5784b 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!");
}