Author: Gregor Wegberg <[email protected]>
Branch: gc-incminimark-pinning
Changeset: r73018:981aab6596c2
Date: 2014-08-23 23:02 +0200
http://bitbucket.org/pypy/pypy/changeset/981aab6596c2/

Log:    (temporary?) fix for 'test_objects_to_trace_bug'. Needs another
        thought to be sure.

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
@@ -2286,7 +2286,13 @@
     def _collect_ref_stk(self, root):
         obj = root.address[0]
         llop.debug_nonnull_pointer(lltype.Void, obj)
-        self.objects_to_trace.append(obj)
+        if not self._is_pinned(obj):
+            # XXX: check if this is the right way (groggi).
+            # A pinned object can be on the stack. Such an object is handled
+            # by minor collections and shouldn't be specially handled by
+            # major collections. Therefore we only add not pinned objects to 
the
+            # list below.
+            self.objects_to_trace.append(obj)
 
     def _collect_ref_rec(self, root, ignored):
         self.objects_to_trace.append(root.address[0])
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to