Re: Re: [farm-report] Daily Snake Farm report

Guido van Rossum <[email protected]> Thu, 12 Sep 2002 11:04:02 -0400
Newsgroups gmane.comp.python.snake-farm.user
Message-ID <[email protected]>
> There are still a few compile warnings, and three
> "unexpected" test fails.  Here's a trimmed log
> (build platform is Red Hat 7.2/ia64/gcc 2.96-101; I'll
> try to do this on a gcc 3.2 that has "official" Itanium
> support at some point soon).

Thanks!  I've addressed most of these:

> gcc -c -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. 
> -I./Include  -DPy_BUILD_CORE -o Objects/obmalloc.o Objects/obmalloc.c
> Objects/obmalloc.c: In function `new_arena':
> Objects/obmalloc.c:440: warning: cast from pointer to integer of different size

This was innocent, it was throwing away all but the lowest few bits.
With Tim's help I shut up the compiler by casting to (Py_uintptr_t)
first -- this is a typedef defined in pyport.h that is an unsigned int
large enough to hold a pointer.

> gcc -c -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. 
> -I./Include  -DPy_BUILD_CORE -o Objects/stringobject.o Objects/stringobject.c
> Objects/stringobject.c: In function `PyString_Format':
> Objects/stringobject.c:3886: warning: int format, different type arg (arg 5)

This was a genuine 64-bit bug.  Thank you gcc!  It computed the offset
in a string by subtracting two pointers, and then used a %i format.
Fixed by casting to int.

> gcc -c -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. 
> -I./Include  -DPy_BUILD_CORE -o Objects/unicodeobject.o Objects/unicodeobject.c
> Objects/unicodeobject.c: In function `PyUnicodeUCS2_Format':
> Objects/unicodeobject.c:6468: warning: int format, different type arg (arg 5)

Same as the previous.

> TEST:
> ./python -E -c 'import sys ; from distutils.util import get_platform ; 
> print get_platform()+"-"+sys.version[0:3]' >platform
> find ./Lib -name '*.py[co]' -print | xargs rm -f
> ./python -E -tt ./Lib/test/regrtest.py -l
> <string>:0: FutureWarning: hex/oct constants > sys.maxint will return 
> positive values in Python 2.4 and up
> <string>:0: FutureWarning: hex/oct constants > sys.maxint will return 
> positive values in Python 2.4 and up
> <string>:0: FutureWarning: hex/oct constants > sys.maxint will return 
> positive values in Python 2.4 and up

I'd like to know what the string is here.  This is kind of hard... :-(

> test_dl
> test test_dl crashed -- exceptions.SystemError: module dl requires 
> sizeof(int) == sizeof(long) == sizeof(char*)

The dl module wasn't written with 64-bit pointers in mind.  I don't
care much about it, so I've just changed setup.py to only compile this
if sys.maxint equals 2*31-1.

> test_slice
> test test_slice failed -- (9, 4294967295, 4294967295) == (9, -1, -1)

Michael alraady fixed this.

> test_socket
> test test_socket failed -- Traceback (most recent call last):
>    File "/home/mats/python/python/dist/src/Lib/test/test_socket.py", line 
> 254, in testNtoH
>      self.assertEqual(i, func(func(i)))
>    File "/home/mats/python/python/dist/src/Lib/unittest.py", line 292, in 
> failUnlessEqual
>      raise self.failureException, \
> AssertionError: -65536 != 4294901760

I still have to think about this.  I think it's just the test that's
too tight.

--Guido van Rossum (home page: http://www.python.org/~guido/)