]> granicus.if.org Git - python/commit
Fix for SF bug 528132 (Armin Rigo): classmethod().__get__() segfault
authorGuido van Rossum <guido@python.org>
Mon, 18 Mar 2002 03:09:06 +0000 (03:09 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 18 Mar 2002 03:09:06 +0000 (03:09 +0000)
commit7e30548285226802702dcdf81c267ebeb00ce2a5
treeefe43f4314a726aed18b0a4d979bdd1a2842e370
parentc99475e7a0b97ae736ed9ecf213727c952666ef0
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've already applied this to the 2.2 branch.
Lib/test/test_descr.py
Objects/funcobject.c