[Python-checkins] r82157 - in python/trunk: Misc/NEWS Objects/exceptions.c
benjamin.peterson
python-checkins at python.org
Tue Jun 22 21:16:38 CEST 2010
Author: benjamin.peterson
Date: Tue Jun 22 21:16:37 2010
New Revision: 82157
Log:
remove INT_MAX assertions; they can fail with large Py_ssize_t #9058
Modified:
python/trunk/Misc/NEWS
python/trunk/Objects/exceptions.c
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS (original)
+++ python/trunk/Misc/NEWS Tue Jun 22 21:16:37 2010
@@ -24,6 +24,8 @@
Core and Builtins
-----------------
+- Issue #9058: Remove assertions about INT_MAX in UnicodeDecodeError.
+
- Issue #8202: Previous change to ``sys.argv[0]`` handling for -m command line
option reverted due to unintended side effects on handling of ``sys.path``.
See tracker issue for details.
Modified: python/trunk/Objects/exceptions.c
==============================================================================
--- python/trunk/Objects/exceptions.c (original)
+++ python/trunk/Objects/exceptions.c Tue Jun 22 21:16:37 2010
@@ -1784,9 +1784,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, "ss#nns",
encoding, object, length, start, end, reason);
}
More information about the Python-checkins
mailing list