Skip to content

Commit 74b458c

Browse files
committed
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 python#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. ........
1 parent 71ce9e7 commit 74b458c

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎Misc/NEWS‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ What's New in Python 2.6.1 alpha 1
1212
Core and Builtins
1313
-----------------
1414

15+
- Issue #3996: On Windows, the PyOS_CheckStack function would cause the
16+
interpreter to abort ("Fatal Python error: Could not reset the stack!")
17+
instead of throwing a MemoryError.
18+
1519
- Issue #4367: Python would segfault during compiling when the unicodedata
1620
module couldn't be imported and \N escapes were present.
1721

‎Python/pythonrun.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1755,7 +1755,7 @@ PyOS_CheckStack(void)
17551755
EXCEPTION_EXECUTE_HANDLER :
17561756
EXCEPTION_CONTINUE_SEARCH) {
17571757
int errcode = _resetstkoflw();
1758-
if (errcode)
1758+
if (errcode == 0)
17591759
{
17601760
Py_FatalError("Could not reset the stack!");
17611761
}

0 commit comments

Comments
 (0)