Author: Armin Rigo <ar...@tunes.org> Branch: reverse-debugger Changeset: r86930:22608a742f02 Date: 2016-09-07 14:59 +0200 http://bitbucket.org/pypy/pypy/changeset/22608a742f02/
Log: hg merge boehm-rawrefcount diff --git a/rpython/rlib/src/boehm-rawrefcount.c b/rpython/rlib/src/boehm-rawrefcount.c --- a/rpython/rlib/src/boehm-rawrefcount.c +++ b/rpython/rlib/src/boehm-rawrefcount.c @@ -190,6 +190,7 @@ printf("next_dead: %p\n", result); #endif assert(result->ob_refcnt == REFCNT_FROM_PYPY); + result->ob_refcnt = 1; p->pyobj = NULL; *pp = p->next_in_bucket; p->next_in_bucket = hash_free_list; diff --git a/rpython/rlib/test/test_rawrefcount.py b/rpython/rlib/test/test_rawrefcount.py --- a/rpython/rlib/test/test_rawrefcount.py +++ b/rpython/rlib/test/test_rawrefcount.py @@ -254,6 +254,9 @@ if rawrefcount.next_dead(PyObject) != ob: print "NEXT_DEAD != OB" return 1 + if ob.c_ob_refcnt != 1: + print "next_dead().ob_refcnt != 1" + return 1 if rawrefcount.next_dead(PyObject) != lltype.nullptr(PyObjectS): print "NEXT_DEAD second time != NULL" return 1 @@ -294,6 +297,9 @@ while True: ob = rawrefcount.next_dead(PyObject) if not ob: break + if ob.c_ob_refcnt != 1: + print "next_dead().ob_refcnt != 1" + return 1 deadlist.append(ob) if len(deadlist) == 0: print "no dead object" _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit