Author: Armin Rigo <[email protected]>
Branch: stm-gc
Changeset: r54693:8f4784f89e0c
Date: 2012-04-23 15:24 +0200
http://bitbucket.org/pypy/pypy/changeset/8f4784f89e0c/

Log:    Fix.

diff --git a/pypy/rpython/memory/gc/stmtls.py b/pypy/rpython/memory/gc/stmtls.py
--- a/pypy/rpython/memory/gc/stmtls.py
+++ b/pypy/rpython/memory/gc/stmtls.py
@@ -113,10 +113,7 @@
         # We must also mark the following objects as GLOBAL again
         obj = self.main_thread_was_global_objects
         self.main_thread_was_global_objects = NULL
-        while obj:
-            hdr = self.gc.header(obj)
-            hdr.tid |= GCFLAG_GLOBAL
-            obj = hdr.version
+        self._promote_list_to_globals(obj)
         if not we_are_translated():
             del self.main_thread_was_global_objects   # don't use any more
 
@@ -308,6 +305,9 @@
         obj = self.sharedarea_tls.chained_list
         self.sharedarea_tls.chained_list = NULL
         #
+        self._promote_list_to_globals(obj)
+
+    def _promote_list_to_globals(self, obj):
         while obj:
             hdr = self.gc.header(obj)
             obj = hdr.version
diff --git a/pypy/translator/stm/test/targetdemo.py 
b/pypy/translator/stm/test/targetdemo.py
--- a/pypy/translator/stm/test/targetdemo.py
+++ b/pypy/translator/stm/test/targetdemo.py
@@ -80,6 +80,7 @@
 
 class InitialTransaction(rstm.Transaction):
     def run(self):
+        debug_print("InitialTransaction.run", self.retry_counter)
         ll_assert(self.retry_counter == 0, "no reason to abort-and-retry here")
         ll_assert(rstm.thread_id() != 0, "thread_id == 0")
         scheduled = []
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to