[Python-checkins] r82164 - in python/branches/release31-maint: Misc/NEWS Objects/exceptions.c

benjamin.peterson python-checkins at python.org
Tue Jun 22 22:11:09 CEST 2010


Author: benjamin.peterson
Date: Tue Jun 22 22:11:09 2010
New Revision: 82164

Log:
Merged revisions 82159 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r82159 | benjamin.peterson | 2010-06-22 14:21:52 -0500 (Tue, 22 Jun 2010) | 9 lines
  
  Merged revisions 82157 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r82157 | benjamin.peterson | 2010-06-22 14:16:37 -0500 (Tue, 22 Jun 2010) | 1 line
    
    remove INT_MAX assertions; they can fail with large Py_ssize_t #9058
  ........
................


Modified:
   python/branches/release31-maint/   (props changed)
   python/branches/release31-maint/Misc/NEWS
   python/branches/release31-maint/Objects/exceptions.c

Modified: python/branches/release31-maint/Misc/NEWS
==============================================================================
--- python/branches/release31-maint/Misc/NEWS	(original)
+++ python/branches/release31-maint/Misc/NEWS	Tue Jun 22 22:11:09 2010
@@ -21,6 +21,8 @@
   The removed code was mutating the ST, causing a second compilation
   to fail.
 
+- Issue #9058: Remove assertions about INT_MAX in UnicodeDecodeError.
+
 - Issue #8941: decoding big endian UTF-32 data in UCS-2 builds could crash
   the interpreter with characters outside the Basic Multilingual Plane
   (higher than 0x10000).

Modified: python/branches/release31-maint/Objects/exceptions.c
==============================================================================
--- python/branches/release31-maint/Objects/exceptions.c	(original)
+++ python/branches/release31-maint/Objects/exceptions.c	Tue Jun 22 22:11:09 2010
@@ -1608,9 +1608,6 @@
     const char *encoding, const char *object, Py_ssize_t length,
     Py_ssize_t start, Py_ssize_t end, const char *reason)
 {
-    assert(length < INT_MAX);
-    assert(start < INT_MAX);
-    assert(end < INT_MAX);
     return PyObject_CallFunction(PyExc_UnicodeDecodeError, "Uy#nnU",
                                  encoding, object, length, start, end, reason);
 }


More information about the Python-checkins mailing list