[pypy-commit] pypy stm-gc: Skip ExcData.exc_value.

arigo noreply at buildbot.pypy.org
Thu Feb 9 16:19:23 CET 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: stm-gc
Changeset: r52300:ec5f429098a2
Date: 2012-02-09 12:15 +0100
http://bitbucket.org/pypy/pypy/changeset/ec5f429098a2/

Log:	Skip ExcData.exc_value.

diff --git a/pypy/rpython/memory/gctypelayout.py b/pypy/rpython/memory/gctypelayout.py
--- a/pypy/rpython/memory/gctypelayout.py
+++ b/pypy/rpython/memory/gctypelayout.py
@@ -428,6 +428,13 @@
                 appendto = self.addresses_of_static_ptrs
             else:
                 return
+        elif hasattr(TYPE, "_hints") and TYPE._hints.get('thread_local'):
+            # The exception data's value object is skipped: it's a thread-
+            # local data structure.  We assume that objects are stored
+            # only temporarily there, so it is always cleared at the point
+            # where we collect the roots.
+            assert TYPE._name == 'ExcData'
+            return
         else:
             appendto = self.addresses_of_static_ptrs_in_nongc
         for a in gc_pointers_inside(value, adr, mutable_only=True):


More information about the pypy-commit mailing list