[pypy-commit] pypy win64_gborg: fixed ovfcheck, which needs to skip symbolics. This caused 50 or more gs tests to fail

ctismer noreply at buildbot.pypy.org
Wed Nov 9 12:37:58 CET 2011


Author: Christian Tismer <tismer at stackless.com>
Branch: win64_gborg
Changeset: r48989:8a0ade5786bf
Date: 2011-11-09 12:37 +0100
http://bitbucket.org/pypy/pypy/changeset/8a0ade5786bf/

Log:	fixed ovfcheck, which needs to skip symbolics. This caused 50 or
	more gs tests to fail

diff --git a/pypy/rlib/rarithmetic.py b/pypy/rlib/rarithmetic.py
--- a/pypy/rlib/rarithmetic.py
+++ b/pypy/rlib/rarithmetic.py
@@ -146,7 +146,9 @@
     assert not isinstance(r, r_uint), "unexpected ovf check on unsigned"
     assert not isinstance(r, r_longlong), "ovfcheck not supported on r_longlong"
     assert not isinstance(r, r_ulonglong), "ovfcheck not supported on r_ulonglong"
-    if not is_valid_int(r):
+    if type(r) is long and not is_valid_int(r):
+        # the type check is needed to make this chek skip symbolics.
+        # this happens in the garbage collector.
         raise OverflowError, "signed integer expression did overflow"
     return r
 


More information about the pypy-commit mailing list