[Python-checkins] r67344 - in python/branches/release26-maint: Misc/NEWS Python/pythonrun.c

amaury.forgeotdarc python-checkins at python.org
Sat Nov 22 21:06:52 CET 2008


Author: amaury.forgeotdarc
Date: Sat Nov 22 21:06:51 2008
New Revision: 67344

Log:
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.
........


Modified:
   python/branches/release26-maint/   (props changed)
   python/branches/release26-maint/Misc/NEWS
   python/branches/release26-maint/Python/pythonrun.c

Modified: python/branches/release26-maint/Misc/NEWS
==============================================================================
--- python/branches/release26-maint/Misc/NEWS	(original)
+++ python/branches/release26-maint/Misc/NEWS	Sat Nov 22 21:06:51 2008
@@ -12,6 +12,10 @@
 Core and Builtins
 -----------------
 
+- Issue #3996: On Windows, the PyOS_CheckStack function would cause the
+  interpreter to abort ("Fatal Python error: Could not reset the stack!")
+  instead of throwing a MemoryError.
+
 - Issue #4367: Python would segfault during compiling when the unicodedata
   module couldn't be imported and \N escapes were present.
 

Modified: python/branches/release26-maint/Python/pythonrun.c
==============================================================================
--- python/branches/release26-maint/Python/pythonrun.c	(original)
+++ python/branches/release26-maint/Python/pythonrun.c	Sat Nov 22 21:06:51 2008
@@ -1755,7 +1755,7 @@
 		        EXCEPTION_EXECUTE_HANDLER : 
 		        EXCEPTION_CONTINUE_SEARCH) {
 		int errcode = _resetstkoflw();
-		if (errcode)
+		if (errcode == 0)
 		{
 			Py_FatalError("Could not reset the stack!");
 		}


More information about the Python-checkins mailing list