From: Benjamin Peterson Date: Tue, 22 Jun 2010 19:16:37 +0000 (+0000) Subject: remove INT_MAX assertions; they can fail with large Py_ssize_t #9058 X-Git-Tag: v2.7~80 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b91338960e1abafbf9328a700227b0e3f59a2226;p=thirdparty%2FPython%2Fcpython.git remove INT_MAX assertions; they can fail with large Py_ssize_t #9058 --- diff --git a/Misc/NEWS b/Misc/NEWS index feab9c55e4a2..cb602391382a 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -24,6 +24,8 @@ What's New in Python 2.7 release candidate 2? 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. diff --git a/Objects/exceptions.c b/Objects/exceptions.c index 2e98283f858b..711c87dea9ad 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -1784,9 +1784,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, "ss#nns", encoding, object, length, start, end, reason); }