[pypy-commit] pypy default: Oops, this test would segfault if Boehm didn't manage to free all 1000

arigo pypy.commits at gmail.com
Wed Jun 29 05:55:33 EDT 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r85445:c1e9b92562a8
Date: 2016-06-29 11:56 +0200
http://bitbucket.org/pypy/pypy/changeset/c1e9b92562a8/

Log:	Oops, this test would segfault if Boehm didn't manage to free all
	1000 dead objects

diff --git a/rpython/translator/c/test/test_boehm.py b/rpython/translator/c/test/test_boehm.py
--- a/rpython/translator/c/test/test_boehm.py
+++ b/rpython/translator/c/test/test_boehm.py
@@ -416,8 +416,10 @@
                 print "not triggered!"
                 return 50
             seen = {}
-            for i in range(1000):
+            while True:
                 a = fq.next_dead()
+                if a is None:
+                    break
                 assert a.i not in seen
                 seen[a.i] = True
             if len(seen) < 500:


More information about the pypy-commit mailing list