[pypy-commit] pypy default: A test which segfaults on "pypy py.test -A"

arigo noreply at buildbot.pypy.org
Fri Sep 26 09:25:06 CEST 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r73714:632cd69be3d3
Date: 2014-09-26 09:17 +0200
http://bitbucket.org/pypy/pypy/changeset/632cd69be3d3/

Log:	A test which segfaults on "pypy py.test -A"

diff --git a/pypy/module/select/test/test_select.py b/pypy/module/select/test/test_select.py
--- a/pypy/module/select/test/test_select.py
+++ b/pypy/module/select/test/test_select.py
@@ -244,6 +244,18 @@
         raises(OverflowError, pollster.modify, 1, -1)
         raises(OverflowError, pollster.modify, 1, 1 << 64)
 
+    def test_resize_list_in_select(self):
+        import select
+        class Foo(object):
+            def fileno(self):
+                print len(l)
+                if len(l) < 100:
+                    l.append(Foo())
+                return 0
+        l = [Foo()]
+        select.select(l, (), (), 0)
+        assert map(type, l) == [Foo] * 100
+
 
 class AppTestSelectWithPipes(_AppTestSelect):
     "Use a pipe to get pairs of file descriptors"


More information about the pypy-commit mailing list