Author: Armin Rigo <[email protected]>
Branch:
Changeset: r335:bf56c12295c8
Date: 2013-07-01 15:07 +0200
http://bitbucket.org/pypy/stmgc/changeset/bf56c12295c8/
Log: Fix: we must explicitly keep the property that L->h_revision==R that
some pairs in public_to_private have got.
diff --git a/c4/gcpage.c b/c4/gcpage.c
--- a/c4/gcpage.c
+++ b/c4/gcpage.c
@@ -373,9 +373,20 @@
G2L_LOOP_FORWARD(d->public_to_private, item) {
/* note that 'item->addr' is also in the read set, so if it was
outdated, it will be found at that time */
- visit_keep(item->addr);
- if (item->val != NULL)
- visit_keep(item->val);
+ gcptr R = item->addr;
+ gcptr L = item->val;
+ visit_keep(R);
+ if (L != NULL) {
+ revision_t v = L->h_revision;
+ visit_keep(L);
+ /* a bit of custom logic here: if L->h_revision used to
+ point exactly to R, as set by stealing, then we must
+ keep this property, even though visit_keep(L) might
+ decide it would be better to make it point to a more
+ recent copy. */
+ if (v == (revision_t)R)
+ L->h_revision = v; /* restore */
+ }
} G2L_LOOP_END;
/* make sure that the other lists are empty */
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit