]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
backport gvanrossum's checkin of
authorMichael W. Hudson <mwh@python.net>
Tue, 5 Mar 2002 15:37:18 +0000 (15:37 +0000)
committerMichael W. Hudson <mwh@python.net>
Tue, 5 Mar 2002 15:37:18 +0000 (15:37 +0000)
commit8b34e6146145e50cde974cbbfd087838a05871c2
tree916dd513b7c5a7b6c4ce600945b07df676ed9297
parent7a4b55ddc09e1a1d3d5120413f8e17db460379bc
backport gvanrossum's checkin of
    revision 1.115 of test_descr.py

SF patch 514641 (Naofumi Honda) - Negative ob_size of LongObjects

Due to the bizarre definition of _PyLong_Copy(), creating an instance
of a subclass of long with a negative value could cause core dumps
later on.  Unfortunately it looks like the behavior of _PyLong_Copy()
is quite intentional, so the fix is more work than feels comfortable.

This fix is almost, but not quite, the code that Naofumi Honda added;
in addition, I added a test case.

I haven't quite worked out how to port the fix yet, but the test cases
can go straight over.
Lib/test/test_descr.py