Author: Armin Rigo <ar...@tunes.org> Branch: copy-over-original2 Changeset: r432:642c4347c8bf Date: 2013-07-24 17:10 +0200 http://bitbucket.org/pypy/stmgc/changeset/642c4347c8bf/
Log: Add a (temporary?) flag for debugging, and found out that sometimes we do get a small stub at the wrong place (gcpage:copy_over_original) diff --git a/c4/et.c b/c4/et.c --- a/c4/et.c +++ b/c4/et.c @@ -1120,6 +1120,7 @@ gcptr stub = stm_stub_malloc(d->public_descriptor, 0); stub->h_tid = (L->h_tid & STM_USER_TID_MASK) | GCFLAG_PUBLIC | GCFLAG_STUB + | GCFLAG_SMALLSTUB | GCFLAG_OLD; stub->h_revision = ((revision_t)L) | 2; diff --git a/c4/gcpage.c b/c4/gcpage.c --- a/c4/gcpage.c +++ b/c4/gcpage.c @@ -266,6 +266,7 @@ /* id_copy may be a stub, but in this case, as the original, it should have been allocated with a big enough chunk of memory */ + assert(!(id_copy->h_tid & GCFLAG_SMALLSTUB)); assert((id_copy->h_tid & GCFLAG_STUB) || stmgc_size(id_copy) == stmgc_size(obj)); /* prehash may be specific hash value for prebuilts, or 0 */ diff --git a/c4/steal.c b/c4/steal.c --- a/c4/steal.c +++ b/c4/steal.c @@ -103,6 +103,7 @@ stub = stm_stub_malloc(sd->foreign_pd, size); stub->h_tid = (obj->h_tid & STM_USER_TID_MASK) | GCFLAG_PUBLIC | GCFLAG_STUB + | GCFLAG_SMALLSTUB | GCFLAG_OLD; stub->h_revision = ((revision_t)obj) | 2; if (obj->h_original) { _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit