<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Objects/longobject.c, branch 2.4</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Objects/longobject.c?h=2.4</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Objects/longobject.c?h=2.4'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2006-10-09T18:42:49Z</updated>
<entry>
<title>[Partial backport of r45947 | neal.norwitz]</title>
<updated>2006-10-09T18:42:49Z</updated>
<author>
<name>Andrew M. Kuchling</name>
<email>amk@amk.ca</email>
</author>
<published>2006-10-09T18:42:49Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=2fafa251dba5df1f90326a825ac6de2b6b906bc3'/>
<id>urn:sha1:2fafa251dba5df1f90326a825ac6de2b6b906bc3</id>
<content type='text'>
Fix problems found by Coverity.

longobject.c: also fix an ssize_t problem
  &lt;a&gt; could have been NULL, so hoist the size calc to not use &lt;a&gt;.

[The ssize_t change isn't needed for 2.4.  The other changes in this revision
 are to modules not present in 2.4. --amk]
</content>
</entry>
<entry>
<title>A review of overflow-detecting code in the 2.4 branch.</title>
<updated>2006-10-04T10:13:32Z</updated>
<author>
<name>Armin Rigo</name>
<email>arigo@tunes.org</email>
</author>
<published>2006-10-04T10:13:32Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=b2d0f342404de73905e4febb8c202f41fc0f654f'/>
<id>urn:sha1:b2d0f342404de73905e4febb8c202f41fc0f654f</id>
<content type='text'>
* 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.
</content>
</entry>
<entry>
<title>[Backport r50779 | neal.norwitz]</title>
<updated>2006-10-03T18:52:07Z</updated>
<author>
<name>Andrew M. Kuchling</name>
<email>amk@amk.ca</email>
</author>
<published>2006-10-03T18:52:07Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=b1d70432909818983b59de1245562cb89040e7ce'/>
<id>urn:sha1:b1d70432909818983b59de1245562cb89040e7ce</id>
<content type='text'>
Move the initialization of size_a down below the check for a being NULL.

Reported by Klocwork #106.

[Slight change required: in 2.5 Py_ssize_t is used, but 2.4 uses int.]
</content>
</entry>
<entry>
<title>Backport r42894: SF #1444030 Fix several potential defects found</title>
<updated>2006-03-07T15:59:09Z</updated>
<author>
<name>Hye-Shik Chang</name>
<email>hyeshik@gmail.com</email>
</author>
<published>2006-03-07T15:59:09Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=361cd4bd6c9c2d56ed154922e016c47d4bee9482'/>
<id>urn:sha1:361cd4bd6c9c2d56ed154922e016c47d4bee9482</id>
<content type='text'>
by Coverity.
</content>
</entry>
<entry>
<title>backporting fix by tim_one:</title>
<updated>2005-07-18T07:24:37Z</updated>
<author>
<name>Georg Brandl</name>
<email>georg@python.org</email>
</author>
<published>2005-07-18T07:24:37Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=7f944144855e431e6f74a743c9fc6afd7279f149'/>
<id>urn:sha1:7f944144855e431e6f74a743c9fc6afd7279f149</id>
<content type='text'>
"""
SF bug #1238681:  freed pointer is used in longobject.c:long_pow().

In addition, long_pow() skipped a necessary (albeit extremely unlikely
to trigger) error check when converting an int modulus to long.

Alas, I was unable to write a test case that crashed due to either
cause.
"""
</content>
</entry>
<entry>
<title>Revert previous checkin on getargs 'L' code. Try to convert all</title>
<updated>2005-03-03T12:26:20Z</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2005-03-03T12:26:20Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=77c8402c97092b5520ac13ad4ffa4417a08a8db9'/>
<id>urn:sha1:77c8402c97092b5520ac13ad4ffa4417a08a8db9</id>
<content type='text'>
numbers in PyLong_AsLongLong, and update test suite accordingly.
</content>
</entry>
<entry>
<title>Patch #1024670: Support int objects in PyLong_AsUnsignedLong[Mask].</title>
<updated>2004-09-20T06:17:46Z</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2004-09-20T06:17:46Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=729d47db091f33ab366be2e43d7bee17f06d10d7'/>
<id>urn:sha1:729d47db091f33ab366be2e43d7bee17f06d10d7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>long_pow():  Fix more instances of leaks in error cases.</title>
<updated>2004-08-30T02:58:59Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2004-08-30T02:58:59Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=cd97da3b1d61be00bb06f3264a60418dbdb83bd8'/>
<id>urn:sha1:cd97da3b1d61be00bb06f3264a60418dbdb83bd8</id>
<content type='text'>
Bugfix candidate -- although long_pow() is so different now I doubt a
patch would apply to 2.3.
</content>
</entry>
<entry>
<title>SF patch 936813: fast modular exponentiation</title>
<updated>2004-08-30T02:44:38Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2004-08-30T02:44:38Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=47e52ee0c5c8868db903d476b49c3368fce4d79a'/>
<id>urn:sha1:47e52ee0c5c8868db903d476b49c3368fce4d79a</id>
<content type='text'>
This checkin is adapted from part 2 (of 3) of Trevor Perrin's patch set.

BACKWARD INCOMPATIBILITY:  SHIFT must now be divisible by 5.  AFAIK,
nobody will care.  long_pow() could be complicated to worm around that,
if necessary.

long_pow():
  - BUGFIX:  This leaked the base and power when the power was negative
    (and so the computation delegated to float pow).
  - Instead of doing right-to-left exponentiation, do left-to-right.  This
    is more efficient for small bases, which is the common case.
  - In addition, if the exponent is large (more than FIVEARY_CUTOFF
    digits), precompute [a**i % c for i in range(32)], and go left to
    right 5 bits at a time.
l_divmod():
  - The signature changed so that callers who don't want the quotient,
    or don't want the remainder, can pass NULL in the slot they don't
    want.  This saves them from having to declare a vrbl for unwanted
    stuff, and remembering to decref it.
long_mod(), long_div(), long_classic_div():
  - Adjust to new l_divmod() signature, and simplified as a result.
</content>
</entry>
<entry>
<title>SF patch 936813: fast modular exponentiation</title>
<updated>2004-08-29T22:16:50Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2004-08-29T22:16:50Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=0973b99e1cfe13b3d197e1b6c449a2d75b55d17a'/>
<id>urn:sha1:0973b99e1cfe13b3d197e1b6c449a2d75b55d17a</id>
<content type='text'>
This checkin is adapted from part 1 (of 3) of Trevor Perrin's patch set.

x_mul()
  - sped a little by optimizing the C
  - sped a lot (~2X) if it's doing a square; note that long_pow() squares
    often
k_mul()
  - more cache-friendly now if it's doing a square
KARATSUBA_CUTOFF
  - boosted; gradeschool mult is quicker now, and it may have been too low
    for many platforms anyway
KARATSUBA_SQUARE_CUTOFF
  - new
  - since x_mul is a lot faster at squaring now, the point at which
    Karatsuba pays for squaring is much higher than for general mult
</content>
</entry>
</feed>
