]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Test full range of native ints. This exposes two more binary pickle
authorTim Peters <tim.peters@gmail.com>
Tue, 10 Apr 2001 03:41:41 +0000 (03:41 +0000)
committerTim Peters <tim.peters@gmail.com>
Tue, 10 Apr 2001 03:41:41 +0000 (03:41 +0000)
commite089c688717fbc7c208ad30ee885dcd93a4de678
tree482d34aafc818b97fe753c9a369af32170b8fa6e
parentaa815df1e18b9b717e39e258f416b107476b4db2
Test full range of native ints.  This exposes two more binary pickle
bugs on sizeof(long)==8 machines.  pickle.py has no idea what it's
doing with very large ints, and variously gets things right by accident,
computes nonsense, or generates corrupt pickles.  cPickle fails on
cases 2**31 <= i < 2**32:  since it *thinks* those are 4-byte ints
(the "high 4 bytes" are all zeroes), it stores them in the (signed!) BININT
format, so they get unpickled as negative values.
Lib/test/pickletester.py