issues with int/long on 64bit platforms - eg stringobject (PR#306)
The email below is a serious bug report. A quick analysis shows that
UserString.count() calls the count() method on a string object, which
calls PyArg_ParseTuple() with the format string "O|ii". The 'i'
format code truncates integers. It probably should raise an overflow
exception instead. But that would still cause the test to fail --
just in a different way (more explicit). Then the string methods
should be fixed to use long ints instead -- and then something else
would probably break...
--Guido van Rossum (home page: http://www.python.org/~guido/)
------- Forwarded Message
Date: Mon, 24 Apr 2000 19:26:27 -0400
From: mark.favas@per.dem.csiro.au
To: python-bugs-list@python.org
cc: bugs-py@python.org
Subject: [Python-bugs-list] 1.6a2 issues with int/long on 64bit platforms - eg
stringobject (PR#306)
Full_Name: Mark Favas
Version: 1.6a2 CVS of 25 April
OS: DEC Alpha, Tru64 Unix 4.0F
Submission from: wa107.dialup.csiro.au (130.116.4.107)
There seems to be issues (and perhaps lurking cans of worms) on 64-bit
platforms
where sizeof(long) != sizeof(int).
For example, the CVS version of 1.6a2 of 25 April fails the UserString
regression test. The tests fail as follows (verbose set to 1):
abcabcabc.count(('abc',)) no
'abcabcabc'
- -1
abcdefghiabc.rfind(('abc',)) no
'abcdefghiabc'
participants (5)
-
Guido van Rossum
-
M.-A. Lemburg
-
Tim Peters
-
Trent Mick
-
Trent Mick