[Python-checkins] python/dist/src/Lib/test test_descr.py,1.150,1.151
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
2002年8月06日 14:28:30 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv28164
Modified Files:
test_descr.py
Log Message:
Add testcase for SF bug 574207 (chained __slots__ dealloc segfault).
Fix forthcoming.
Index: test_descr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v
retrieving revision 1.150
retrieving revision 1.151
diff -C2 -d -r1.150 -r1.151
*** test_descr.py 1 Aug 2002 14:39:03 -0000 1.150
--- test_descr.py 6 Aug 2002 21:28:28 -0000 1.151
***************
*** 3220,3223 ****
--- 3220,3236 ----
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:
***************
*** 3311,3314 ****
--- 3324,3328 ----
slices()
subtype_resurrection()
+ slottrash()
if verbose: print "All OK"