Author: Remi Meier <[email protected]>
Branch:
Changeset: r500:63c2673c2045
Date: 2013-08-27 14:34 +0200
http://bitbucket.org/pypy/stmgc/changeset/63c2673c2045/
Log: fix wrong assumption about h_revision of stubs
diff --git a/c4/gcpage.c b/c4/gcpage.c
--- a/c4/gcpage.c
+++ b/c4/gcpage.c
@@ -495,15 +495,24 @@
static void mark_registered_stubs(void)
{
wlog_t *item;
+ gcptr L;
+
G2L_LOOP_FORWARD(registered_stubs, item) {
gcptr R = item->addr;
assert(R->h_tid & GCFLAG_SMALLSTUB);
R->h_tid |= (GCFLAG_MARKED | GCFLAG_VISITED);
- gcptr L = (gcptr)(R->h_revision - 2);
- L = stmgcpage_visit(L);
- R->h_revision = ((revision_t)L) | 2;
+ if (R->h_revision & 2) {
+ L = (gcptr)(R->h_revision - 2);
+ L = stmgcpage_visit(L);
+ R->h_revision = ((revision_t)L) | 2;
+ }
+ else {
+ L = (gcptr)R->h_revision;
+ L = stmgcpage_visit(L);
+ R->h_revision = (revision_t)L;
+ }
/* h_original will be kept up-to-date because
it is either == L or L's h_original. And
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit