summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-08-06 21:28:28 (GMT)
committerGuido van Rossum <guido@python.org>2002-08-06 21:28:28 (GMT)
commit2d702465b3de36d4689fff0fd497ca10876f6461 (patch)
tree61f7b6b6b20225f08c596e91b1eefc17c8abbb82 /Lib/test
parent2d3c03df9acaed093d2387b082bcfb32f89d82f9 (diff)
downloadcpython-2d702465b3de36d4689fff0fd497ca10876f6461.zip
cpython-2d702465b3de36d4689fff0fd497ca10876f6461.tar.gz
cpython-2d702465b3de36d4689fff0fd497ca10876f6461.tar.bz2
Add testcase for SF bug 574207 (chained __slots__ dealloc segfault).
Fix forthcoming.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_descr.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 543dfa4..94dba1a 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -3219,6 +3219,19 @@ def subtype_resurrection():
# it as a leak.
del C.__del__
+def slottrash():
+ # Deallocating deeply nested slotted trash caused stack overflows
+ if verbose:
+ print "Testing slot trash..."
+ class trash(object):
+ __slots__ = ['x']
+ def __init__(self, x):
+ self.x = x
+ o = None
+ for i in xrange(50000):
+ o = trash(o)
+ del o
+
def do_this_first():
if verbose:
print "Testing SF bug 551412 ..."
@@ -3310,6 +3323,7 @@ def test_main():
copy_setstate()
slices()
subtype_resurrection()
+ slottrash()
if verbose: print "All OK"
if __name__ == "__main__":