]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Fix for SF bug 528132 (Armin Rigo): classmethod().__get__() segfault
authorGuido van Rossum <guido@python.org>
Mon, 18 Mar 2002 03:05:36 +0000 (03:05 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 18 Mar 2002 03:05:36 +0000 (03:05 +0000)
commit09f2187704cdacc4e3f86b357d110445541e6ad7
treead782ffc9bfe9407df2fc1964345c37435f14036
parent7eac98d6359533d762753f8bd730ed3c7c6e720a
Fix for SF bug 528132 (Armin Rigo): classmethod().__get__() segfault

The proper fix is not quite what was submitted; it's really better to
take the class of the object passed rather than calling PyMethod_New
with NULL pointer args, because that can then cause other core dumps
later.

I also added a testcase for the fix to classmethods() in test_descr.py.

I'll apply this to 2.3 too.
Lib/test/test_descr.py
Objects/funcobject.c