[pypy-commit] stmgc default: Fix again (or attempt to) this case...

arigo noreply at buildbot.pypy.org
Wed Jun 26 18:07:07 CEST 2013


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r287:03917cbbc4f7
Date: 2013-06-26 18:06 +0200
http://bitbucket.org/pypy/stmgc/changeset/03917cbbc4f7/

Log:	Fix again (or attempt to) this case...

diff --git a/c4/et.c b/c4/et.c
--- a/c4/et.c
+++ b/c4/et.c
@@ -652,10 +652,18 @@
             {
               /* such an object R might be listed in list_of_read_objects
                  before it was turned from protected to private */
-              if(((gcptr)v)->h_tid & GCFLAG_BACKUP_COPY)
-                continue;
-              /* the backup was stolen */
-              return 0; 
+              if (((gcptr)v)->h_tid & GCFLAG_PUBLIC)
+                {
+                  /* The backup was stolen, but maybe not modified
+                     afterwards.  Check it. */
+                  R = (gcptr)v;
+                  goto retry;
+                }
+              else
+                {
+                  /* The backup was not stolen, everything's fine */
+                  continue;
+                }
             }
           else if ((R->h_tid & (GCFLAG_PUBLIC | GCFLAG_NURSERY_MOVED))
                             == (GCFLAG_PUBLIC | GCFLAG_NURSERY_MOVED))
diff --git a/c4/test/test_random.py b/c4/test/test_random.py
--- a/c4/test/test_random.py
+++ b/c4/test/test_random.py
@@ -523,4 +523,4 @@
 def test_more_multi_thread():
     py.test.skip("more random tests")
     for i in range(200):
-        yield test_multi_thread, 1858 + i
+        yield test_multi_thread, 1742/2 + i


More information about the pypy-commit mailing list