[pypy-commit] stmgc default: Fix.

arigo noreply at buildbot.pypy.org
Sun Jun 16 18:46:49 CEST 2013


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r159:b1fc519ee04b
Date: 2013-06-16 18:46 +0200
http://bitbucket.org/pypy/stmgc/changeset/b1fc519ee04b/

Log:	Fix.

diff --git a/c4/et.c b/c4/et.c
--- a/c4/et.c
+++ b/c4/et.c
@@ -448,6 +448,7 @@
 static gcptr LocalizePublic(struct tx_descriptor *d, gcptr R)
 {
   assert(R->h_tid & GCFLAG_PUBLIC);
+  assert(!(R->h_tid & GCFLAG_NURSERY_MOVED));
 
 #ifdef _GC_DEBUG
   wlog_t *entry;
@@ -529,6 +530,14 @@
          Add R into the list 'public_with_young_copy', unless W is
          actually an old object, in which case we need to record W.
       */
+      if (R->h_tid & GCFLAG_NURSERY_MOVED)
+        {
+          /* Bah, the object turned into this kind of stub while we
+             were waiting for the collection_lock, because it was
+             stolen by someone else.  Use R->h_revision instead. */
+          assert(IS_POINTER(R->h_revision));
+          R = (gcptr)R->h_revision;
+        }
       assert(R->h_tid & GCFLAG_OLD);
       W = LocalizePublic(d, R);
       assert(is_private(W));


More information about the pypy-commit mailing list