[pypy-commit] pypy stmgc-c7: There are cases here where the list of pending setups is not empty after

arigo noreply at buildbot.pypy.org
Mon Feb 9 10:22:02 CET 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c7
Changeset: r75779:c59b920f11dc
Date: 2015-02-09 10:21 +0100
http://bitbucket.org/pypy/pypy/changeset/c59b920f11dc/

Log:	There are cases here where the list of pending setups is not empty
	after specialize_block(). Empty it during the same transaction.
	Otherwise in rare cases some reprs stay non-setup()ed for a non-
	deterministic while and then other reprs' setup crash

diff --git a/rpython/rtyper/rtyper.py b/rpython/rtyper/rtyper.py
--- a/rpython/rtyper/rtyper.py
+++ b/rpython/rtyper/rtyper.py
@@ -345,6 +345,17 @@
         return LowLevelOpList(self, block)
 
     def specialize_block(self, block):
+        lst = self._list_must_call_setup()
+        assert lst == []
+        self._specialize_block(block)
+        # There are cases here where the list of pending setups is not empty.
+        # Better empty it now during the same transaction.  Otherwise in rare
+        # cases some reprs stay non-setup()ed for a non-deterministic while
+        # and then other reprs' setup crash
+        while lst:
+            self.call_all_setups()
+
+    def _specialize_block(self, block):
         graph = self.annotator.annotated[block]
         if graph not in self.annotator.fixed_graphs:
             self.annotator.fixed_graphs.add(graph)


More information about the pypy-commit mailing list