Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r498:d2e01fce511f
Date: 2013-08-23 20:10 +0200
http://bitbucket.org/pypy/stmgc/changeset/d2e01fce511f/

Log:    Fix a bug found by running PyPy (graphwalktest.py, which I will
        check in together with other test files I'm writing).

diff --git a/c4/steal.c b/c4/steal.c
--- a/c4/steal.c
+++ b/c4/steal.c
@@ -217,11 +217,12 @@
             dprintf(("already stolen: %p -> %p\n", P, L));
 
             /* note that we should follow h_revision at least one more
-               step: it is necessary if L is public but young (and then
-               has GCFLAG_MOVED), but it is fine to do it more
-               generally. */
-            v = ACCESS_ONCE(L->h_revision);
-            if (IS_POINTER(v)) {
+               step: in the case where L is public but young (and then
+               has GCFLAG_MOVED).  Don't do it generally!  L might be
+               a stub again. */
+            if (L->h_tid & GCFLAG_MOVED) {
+                v = ACCESS_ONCE(L->h_revision);
+                assert(IS_POINTER(v));
                 L = (gcptr)v;
                 dprintf(("\t---> %p\n", L));
             }
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to