[pypy-svn] r39644 - pypy/dist/pypy/translator/c/test
rxe at codespeak.net
rxe at codespeak.net
Thu Mar 1 20:31:36 CET 2007
Author: rxe
Date: Thu Mar 1 20:31:33 2007
New Revision: 39644
Modified:
pypy/dist/pypy/translator/c/test/test_newgc.py
Log:
(mwh, rxe) add a failing skipped test with collecting in dictionary resizing
Modified: pypy/dist/pypy/translator/c/test/test_newgc.py
==============================================================================
--- pypy/dist/pypy/translator/c/test/test_newgc.py (original)
+++ pypy/dist/pypy/translator/c/test/test_newgc.py Thu Mar 1 20:31:33 2007
@@ -859,6 +859,35 @@
# the point is just not to segfault
res = fn()
+ def test_dict_segfault(self):
+ py.test.skip("some gc collect failing - somehow")
+ class Element:
+ pass
+
+ elements = [Element() for ii in range(10000)]
+
+ def dostuff():
+ reverse = {}
+ l = elements[:]
+
+ for ii in elements:
+ reverse[ii] = ii
+ # print reverse.get(ii, None)
+
+ for jj in range(100):
+ e = l[-1]
+ del reverse[e]
+ l.remove(e)
+
+ def f():
+ for ii in range(100):
+ print ii
+ dostuff()
+
+ fn = self.getcompiled(f)
+ # the point is just not to segfault
+ res = fn()
+
class TestUsingStacklessFramework(TestUsingFramework):
gcpolicy = "stacklessgc"
More information about the pypy-svn
mailing list