Commits

Antonio Cuni committed d817983

crash even when unstralsated if you call can_enter_jit on an autoreds driver

Comments (0)

Files changed (2)

         _self._check_arguments(livevars)
 
     def can_enter_jit(_self, **livevars):
+        if _self.autoreds:
+            raise TypeError, "Cannot call can_enter_jit on a driver with reds='auto'"
         # special-cased by ExtRegistryEntry
         _self._check_arguments(livevars)
 

pypy/rlib/test/test_jit.py

     assert driver.autoreds
     assert driver.reds == []
     assert driver.numreds is None
+    py.test.raises(TypeError, "driver.can_enter_jit(foo='something')")
     #
     py.test.raises(AssertionError, "JitDriver(greens=['foo'], reds='auto', confirm_enter_jit='something')")