]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
A review of overflow-detecting code in the 2.4 branch.
authorArmin Rigo <arigo@tunes.org>
Wed, 4 Oct 2006 10:13:32 +0000 (10:13 +0000)
committerArmin Rigo <arigo@tunes.org>
Wed, 4 Oct 2006 10:13:32 +0000 (10:13 +0000)
commitb2d0f342404de73905e4febb8c202f41fc0f654f
tree0cd71d2bcf0c16207d12737d4a73ddd6a2b2e89b
parentf44c1003d0cc91a773c07de89dbc316926a36fd3
A review of overflow-detecting code in the 2.4 branch.

* unified the way intobject, longobject and mystrtoul handle
  values around -sys.maxint-1.

* in general, trying to entierely avoid overflows in any computation
  involving signed ints or longs is extremely involved.  Fixed a few
  simple cases where a compiler might be too clever (but that's all
  guesswork).

* more overflow checks against bad data in marshal.c.
12 files changed:
Lib/test/test_builtin.py
Lib/test/test_long.py
Misc/NEWS
Objects/abstract.c
Objects/fileobject.c
Objects/intobject.c
Objects/listobject.c
Objects/longobject.c
Objects/stringobject.c
Objects/unicodeobject.c
Python/marshal.c
Python/mystrtoul.c