comparison Python/pythonrun.c @ 49818:5d9be65e7891 2.6

Merged revisions 67343 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r67343 | amaury.forgeotdarc | 2008-11-22 21:01:18 +0100 (sam., 22 nov. 2008) | 5 lines #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. ........
author Amaury Forgeot d'Arc <amauryfa@gmail.com>
date Sat, 22 Nov 2008 20:06:51 +0000
parents 6cac2e3077a3
children ee9ced92843a 636a0ac9607b
comparison
equal deleted inserted replaced
49796:0bcafa64eccb 49818:5d9be65e7891
1753 return 0; 1753 return 0;
1754 } __except (GetExceptionCode() == STATUS_STACK_OVERFLOW ? 1754 } __except (GetExceptionCode() == STATUS_STACK_OVERFLOW ?
1755 EXCEPTION_EXECUTE_HANDLER : 1755 EXCEPTION_EXECUTE_HANDLER :
1756 EXCEPTION_CONTINUE_SEARCH) { 1756 EXCEPTION_CONTINUE_SEARCH) {
1757 int errcode = _resetstkoflw(); 1757 int errcode = _resetstkoflw();
1758 if (errcode) 1758 if (errcode == 0)
1759 { 1759 {
1760 Py_FatalError("Could not reset the stack!"); 1760 Py_FatalError("Could not reset the stack!");
1761 } 1761 }
1762 } 1762 }
1763 return 1; 1763 return 1;