[New-bugs-announce] [issue3026] mmap broken with large files on 64bit system

Matthew Mueller report at bugs.python.org
Mon Jun 2 04:24:58 CEST 2008


New submission from Matthew Mueller <donut at users.sourceforge.net>:

mmap on large files on 64 bit platforms in python >=2.5 returns some
sort of garbage.  In 2.4 it would just throw an exception.  Now I get
something like this (script runs md5.md5 on mmap object, and then runs
os.system md5sum for comparison):

This is python2.5 from Ubuntu 8.04 AMD64
/tmp$ python2.5 testbigfile.py 
python mmap md5: 1230552d39b7c1751f86bae5205ec0c8
abe59e28c9a3f11b883f62c80a3833a5 *bigfile


This is python svn as of 20080601, compiled the on same system.
/tmp$ python2.6 testbigfile.py
testbigfile.py:5: DeprecationWarning: the md5 module is deprecated; use
hashlib instead
  import md5
python mmap md5: 1230552d39b7c1751f86bae5205ec0c8
abe59e28c9a3f11b883f62c80a3833a5 *bigfile


Also note how the python md5 call returns immediately, not something you
would expect when md5ing 4GB of data.

----------
components: Extension Modules
files: testbigfile.py
messages: 67623
nosy: donut
severity: normal
status: open
title: mmap broken with large files on 64bit system
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file10500/testbigfile.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3026>
_______________________________________


More information about the New-bugs-announce mailing list