Dustin Boswell added the comment: Yes, bug exists on 3.1 (gcc build), as well as darwin build of 2.7:
python3.1 -c "import json; json.loads('[%2200000000s' % ']')" Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3.1/json/__init__.py", line 293, in loads return _default_decoder.decode(s) File "/usr/lib/python3.1/json/decoder.py", line 328, in decode raise ValueError(errmsg("Extra data", s, end, len(s))) ValueError: Extra data: line 1 column -2094967295 - line 1 column 2200000001 (char -2094967295 - 2200000001) python3.1 Python 3.1.2 (r312:79147, Oct 23 2012, 20:07:42) [GCC 4.4.3] on linux2 >>> import sys;print("%x" % sys.maxsize, sys.maxsize > 2**32) 7fffffffffffffff True python2.7 -c "import json; json.loads('[%2200000000s' % ']')" Traceback (most recent call last): File "<string>", line 1, in <module> File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 326, in loads File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 369, in decode ValueError: Extra data: line 1 column -2094967295 - line 1 column 2200000001 (char -2094967295 - 2200000001) python2.7 Python 2.7.2 (default, Jun 20 2012, 16:23:33) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin >>> import sys;print("%x" % sys.maxsize, sys.maxsize > 2**32) ('7fffffffffffffff', True) ---------- versions: +Python 3.1 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16586> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com