Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r88756:fe98eb698187
Date: 2016-11-30 11:10 +0100
http://bitbucket.org/pypy/pypy/changeset/fe98eb698187/

Log:    oops, fix the GC

diff --git a/rpython/memory/gc/incminimark.py b/rpython/memory/gc/incminimark.py
--- a/rpython/memory/gc/incminimark.py
+++ b/rpython/memory/gc/incminimark.py
@@ -1164,6 +1164,11 @@
             obj = self.get_forwarding_address(obj)
         return self.get_type_id(obj)
 
+    def get_possibly_forwarded_tid(self, obj):
+        if self.is_in_nursery(obj) and self.is_forwarded(obj):
+            obj = self.get_forwarding_address(obj)
+        return self.header(obj).tid
+
     def get_total_memory_used(self):
         """Return the total memory used, not counting any object in the
         nursery: only objects in the ArenaCollection or raw-malloced.
@@ -2678,7 +2683,7 @@
         while self.probably_young_objects_with_finalizers.non_empty():
             obj = self.probably_young_objects_with_finalizers.popleft()
             fq_nr = self.probably_young_objects_with_finalizers.popleft()
-            if self.header(obj).tid & GCFLAG_IGNORE_FINALIZER:
+            if self.get_possibly_forwarded_tid(obj) & GCFLAG_IGNORE_FINALIZER:
                 continue
             self.singleaddr.address[0] = obj
             self._trace_drag_out1(self.singleaddr)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to