[issue4977] test_maxint64 fails on 32-bit systems due to assumption that 64-bit fits into long

2009-04-11 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Closing since I haven't seen any sign of such failures on a 64-bit build.

--
resolution:  - works for me
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4977
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4977] test_maxint64 fails on 32-bit systems due to assumption that 64-bit fits into long

2009-01-20 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Closing as invalid.

--
resolution:  - invalid
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4977
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4977] test_maxint64 fails on 32-bit systems due to assumption that 64-bit fits into long

2009-01-20 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Reopening at OP's request.

--
nosy: +pitrou
resolution: invalid - 
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4977
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4977] test_maxint64 fails on 32-bit systems due to assumption that 64-bit fits into long

2009-01-20 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Two comments:
- please be more specific when mentioning a problem (when reading your
bug report, I had a hard time figuring out what test_maxint64 could be)
- I hope you're testing against trunk or at least 2.6, because the 2.5
branch will only receive security fixes

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4977
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4977] test_maxint64 fails on 32-bit systems due to assumption that 64-bit fits into long

2009-01-20 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Antoine, I leave it to you to decide what to do with this.

As far as I can see, the only action that one might want to take
as a result of this issue is to replace strtol with PyOS_strol
in the codebase (in the struct module, and there's also an
occurrence in Objects/floatobject.c in the fromhex method).

I recommend against this though, for a few reasons:

1. PyOS_strtol is likely slower than strtol.

2. PyOS_strtol is itself buggy:  for example, it incorrectly
accepts strings like - 3, with whitespace between the sign
and the unsigned part.  This is the reason that Python accepts
'- 3' as an input to int;  this is a Python bug that can't be
changed in 2.x for compatibility reasons.  It's fixed in 3.x.

3. There's nothing wrong with the existing code, and changing
it risks introducing new bugs.  It's the platform that's buggy here: 
its strtol method doesn't comply with the C89 standard (or the C99
standard, for that matter).

It's true that Python has code to work around problems with standards
compliance on some platforms, and if this were a supported platform
then I'd be okay with making the change.  As it is, though, I think this
should be reclosed (as invalid, or won't fix if that makes people feel
happier).

BTW, Luke, note that you can still add comments to an issue even after
the issue has been closed:  people subscribed to that issue (via nosy)
will still see the messages.

--
assignee:  - pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4977
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4977] test_maxint64 fails on 32-bit systems due to assumption that 64-bit fits into long

2009-01-20 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
nosy:  -marketdickinson

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4977
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4977] test_maxint64 fails on 32-bit systems due to assumption that 64-bit fits into long

2009-01-20 Thread Luke Kenneth Casson Leighton

Luke Kenneth Casson Leighton l...@lkcl.net added the comment:

hiya folks,

lots of comments here.  in no particular order:

1) thanks for reopening the bug

2) apologies for not being clearer - it's Lib/test/test_testzip.py
specifically the  TestZip64InSmallFiles case that's failing.

3) it's not yet _clear_ whether strtol is the cause of the
problem - i haven't yet got round to testing that because
i'm in the middle of a rebuild trying to get msvcr80
assemblies to work, and i'll need to back out of that and
rebuild with msvcrt or msvcrt71 first.

4) i'm not yet certain as to whether it's the mingw 3.4.5
_compiler_ that's broken (!) there's some empirical evidence
suggesting that it might well be, but again, that's not
yet determined

5) under wine, strtol goes through to msvcrt, which goes through
to ntdll, which goes through to the _unix_ system's strtol.
wine is compiled with -m32, so it _should_ still all be doing
32-bit stuff, even though i'm using a 64-bit host (debian/amd64).

on balance, i'd very much appreciate this being kept open so that i
can keep track of determining what the heck is going on - i have
about five or six different things to investigate.

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4977
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4977] test_maxint64 fails on 32-bit systems due to assumption that 64-bit fits into long

2009-01-17 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

From the included patch, I assume you're talking about a failure of
test_pickle.

I'm not seeing any such failure on my (32-bit) system, and the code in 
Modules/cPickle.c looks correct to me.  I suspect that the problem is that 
in your setup, strtol is failing to set errno correctly on overflow.

--
nosy: +marketdickinson

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4977
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4977] test_maxint64 fails on 32-bit systems due to assumption that 64-bit fits into long

2009-01-17 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

You might try replacing the strtol call with a call to PyOS_strtol.  
Please let us know if this works!

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4977
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com