Author: Armin Rigo <ar...@tunes.org> Branch: stmgc-c4 Changeset: r67187:ef344f3f8725 Date: 2013-10-08 07:16 +0200 http://bitbucket.org/pypy/pypy/changeset/ef344f3f8725/
Log: import stmgc/9149deb7e746 diff --git a/rpython/translator/stm/src_stm/et.c b/rpython/translator/stm/src_stm/et.c --- a/rpython/translator/stm/src_stm/et.c +++ b/rpython/translator/stm/src_stm/et.c @@ -7,9 +7,9 @@ */ #include "stmimpl.h" -char tmp_buf[128]; char* stm_dbg_get_hdr_str(gcptr obj) { + static char tmp_buf[128]; char *cur; char *flags[] = GC_FLAG_NAMES; int i; @@ -44,8 +44,10 @@ struct tx_descriptor *d = stm_tx_head; while (d && d->public_descriptor != pd) d = d->tx_next; - if (!d) + if (!d) { + fprintf(stderr, "\n"); continue; + } fprintf(stderr, "((struct tx_descriptor *)\033[%dm%p\033[0m)\n" "pthread_self = 0x%lx\n\n", d->tcolor, d, (long)d->pthreadid); diff --git a/rpython/translator/stm/src_stm/nursery.c b/rpython/translator/stm/src_stm/nursery.c --- a/rpython/translator/stm/src_stm/nursery.c +++ b/rpython/translator/stm/src_stm/nursery.c @@ -513,6 +513,9 @@ } else { d->nursery_cleared = NC_REGULAR; +#if defined(_GC_DEBUG) + memset(d->nursery_current, 0xEE, d->nursery_end - d->nursery_current); +#endif } /* if in debugging mode, we allocate a different nursery and make diff --git a/rpython/translator/stm/src_stm/revision b/rpython/translator/stm/src_stm/revision --- a/rpython/translator/stm/src_stm/revision +++ b/rpython/translator/stm/src_stm/revision @@ -1,1 +1,1 @@ -d78107007cab +9149deb7e746 diff --git a/rpython/translator/stm/src_stm/steal.c b/rpython/translator/stm/src_stm/steal.c --- a/rpython/translator/stm/src_stm/steal.c +++ b/rpython/translator/stm/src_stm/steal.c @@ -194,6 +194,7 @@ if (L->h_tid & GCFLAG_HAS_ID) { /* use id-copy for us */ O = (gcptr)L->h_original; + assert(O != L); L->h_tid &= ~GCFLAG_HAS_ID; stm_copy_to_old_id_copy(L, O); O->h_original = 0; @@ -201,6 +202,7 @@ /* Copy the object out of the other thread's nursery, if needed */ O = stmgc_duplicate_old(L); + assert(O != L); /* young and without original? */ if (!(L->h_original)) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit