Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r46209:2d0a01e97aab Date: 2011-08-02 15:42 +0200 http://bitbucket.org/pypy/pypy/changeset/2d0a01e97aab/
Log: A failing test (segfault on top of Boehm). diff --git a/pypy/jit/backend/test/runner_test.py b/pypy/jit/backend/test/runner_test.py --- a/pypy/jit/backend/test/runner_test.py +++ b/pypy/jit/backend/test/runner_test.py @@ -2807,6 +2807,29 @@ assert mem2 < mem1 assert mem2 == mem0 + def test_memoryerror(self): + excdescr = BasicFailDescr(666) + self.cpu.propagate_exception_v = self.cpu.get_fail_descr_number( + excdescr) + i0 = BoxInt() + p0 = BoxPtr() + operations = [ + ResOperation(rop.NEWUNICODE, [i0], p0), + ResOperation(rop.FINISH, [p0], None, descr=BasicFailDescr(1)) + ] + inputargs = [i0] + looptoken = LoopToken() + self.cpu.compile_loop(inputargs, operations, looptoken) + # overflowing values: + for big in [ + sys.maxint // 4 + 1, # just too large + int(2*(sys.maxint+1) // 4) + 3, # intmask(this * 4) == 3 + ]: + self.cpu.set_future_value_int(0, big) + fail = self.cpu.execute_token(looptoken) + assert fail.identifier == excdescr.identifier + assert self.cpu.grab_exc_value() == 42 # XXX + class OOtypeBackendTest(BaseBackendTest): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit