[Python-bugs-list] [ python-Bugs-688424 ] 64-bit test failures

SourceForge.net noreply@sourceforge.net
Tue, 18 Feb 2003 04:43:17 -0800


Bugs item #688424, was opened at 2003-02-17 23:03
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=688424&group_id=5470

Category: Python Interpreter Core
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
>Assigned to: Neal Norwitz (nnorwitz)
Summary: 64-bit test failures

Initial Comment:
The 3 failures are:  test_compile test_hexoct test_sys.
------------------
test_compile failed -- eval('0xffffffff') gave
4294967295, but expected -1

 - Should this case be special cased for 32 vs 64 bit
archs?
------------------
test_hexoct fails in the unsigned tests:

test_hex_unsigned (test.test_hexoct.TextHexOct) ... FAIL
test_oct_unsigned (test.test_hexoct.TextHexOct) ... FAIL

AssertionError: 2147483648 != -2147483648L
------------------
test_sys is specifically in _getframe(sys.maxint):
        int depth = -1;

        if (!PyArg_ParseTuple(args, "|i:_getframe",
&depth))
                return NULL;
This raises an OverflowError instead of a ValueError
which is expected.
Should all "i"s in sysmodule be changed to "l"s with
corresponding changes to long for the C variable?  Or
is the test bogus and we should use a value smaller
than maxint?

----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2003-02-18 07:43

Message:
Logged In: YES 
user_id=6380

Thanks for checking!

test_compile.py, eval('0xffffffff'): yes, on a 64-bit
machine this should test eval('0xffffffffffffffff') and
expect -1.

Ditto for test_hex/oct_unsigned (use 0x800000000000 etc.)

test_sys: since I don't expect anyone to ever have 2 billion
frames, change the test -- using an explicit 2000000000
would be fine IMO, as would be an explicit 0x7ffffff.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=688424&group_id=5470