]> granicus.if.org Git - python/commitdiff
Merged revisions 82159 via svnmerge from
authorBenjamin Peterson <benjamin@python.org>
Tue, 22 Jun 2010 20:11:09 +0000 (20:11 +0000)
committerBenjamin Peterson <benjamin@python.org>
Tue, 22 Jun 2010 20:11:09 +0000 (20:11 +0000)
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
  ........
................

Misc/NEWS
Objects/exceptions.c

index 4464e6230f0b1dfec0e51e0f21b47067fb7fee77..e63f26694e488a152477cb19e42c47e1b03931c7 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -21,6 +21,8 @@ Core and Builtins
   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).
index 234922c585216c57eb283e3cabd2117d44def1fb..841533e72166f2de24119a2363cee05f56af18e1 100644 (file)
@@ -1608,9 +1608,6 @@ PyUnicodeDecodeError_Create(
     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);
 }