[pypy-commit] pypy cpyext-gc-cycle: Fixed bug in rrc incmark

stevie_92 pypy.commits at gmail.com
Wed Nov 27 08:01:30 EST 2019


Author: Stefan Beyer <home at sbeyer.at>
Branch: cpyext-gc-cycle
Changeset: r98162:93669df5242d
Date: 2019-11-27 14:00 +0100
http://bitbucket.org/pypy/pypy/changeset/93669df5242d/

Log:	Fixed bug in rrc incmark

diff --git a/rpython/memory/gc/rrc/incmark.py b/rpython/memory/gc/rrc/incmark.py
--- a/rpython/memory/gc/rrc/incmark.py
+++ b/rpython/memory/gc/rrc/incmark.py
@@ -238,8 +238,8 @@
             while pygchdr <> self.pyobj_list:
                 self._pyobj_gc_refcnt_set(pygchdr, 1)
                 pygchdr = pygchdr.c_gc_next
+            # resurrect "dead" objects
             pygchdr = self.pyobj_old_list.c_gc_next
-            # resurrect "dead" objects
             while pygchdr <> self.pyobj_old_list:
                 self._pyobj_gc_refcnt_set(pygchdr, 1)
                 pygchdr = pygchdr.c_gc_next
@@ -254,6 +254,7 @@
         start = time.time()
 
         if isolate_consistent:
+            debug_print("isolate consistent")
             if not self._gc_list_is_empty(self.pyobj_isolate_old_list):
                 self._gc_list_merge(self.pyobj_isolate_old_list,
                                     self.pyobj_list)
@@ -261,12 +262,14 @@
                 self._gc_list_merge(self.pyobj_isolate_dead_list,
                                     self.pyobj_dead_list)
         else:
+            debug_print("isolate inconsistent")
             # continue previous loop, keep objects alive
             pygchdr = pygchdr_continue_isolate
             while pygchdr <> self.pyobj_isolate_old_list:
                 self._pyobj_gc_refcnt_set(pygchdr, 1)
                 pygchdr = pygchdr.c_gc_next
             # resurrect "dead" objects
+            pygchdr = self.pyobj_isolate_dead_list.c_gc_next
             while pygchdr <> self.pyobj_isolate_dead_list:
                 self._pyobj_gc_refcnt_set(pygchdr, 1)
                 pygchdr = pygchdr.c_gc_next


More information about the pypy-commit mailing list