diff options
| author | Benjamin Peterson <benjamin@python.org> | 2009-04-25 00:44:44 (GMT) |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2009-04-25 00:44:44 (GMT) |
| commit | af75a5f247df360f232f101067eafb7a93b01db4 (patch) | |
| tree | d5867fe95064669910397e1278648d23fee9daab /Lib/test | |
| parent | 50101def6ee183e6d57d6cdbb9c1c9ec463cef59 (diff) | |
| download | cpython-af75a5f247df360f232f101067eafb7a93b01db4.zip cpython-af75a5f247df360f232f101067eafb7a93b01db4.tar.gz cpython-af75a5f247df360f232f101067eafb7a93b01db4.tar.bz2 | |
Merged revisions 71860 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r71860 | benjamin.peterson | 2009-04-24 19:41:22 -0500 (Fri, 24 Apr 2009) | 1 line
fix a segfault when setting __class__ in __del__ #5283
........
Diffstat (limited to 'Lib/test')
| -rw-r--r-- | Lib/test/test_descr.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 554e1c8..cef7d47 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -2959,6 +2959,16 @@ order (MRO) for bases """ continue cant(cls(), cls2) + # Issue5283: when __class__ changes in __del__, the wrong + # type gets DECREF'd. + class O(object): + pass + class A(object): + def __del__(self): + self.__class__ = O + l = [A() for x in range(100)] + del l + def test_set_dict(self): # Testing __dict__ assignment... class C(object): pass |
