[issue4681] mmap offset should be off_t instead of ssize_t, and size calculation needs corrected

Ross Lagerwall report at bugs.python.org
Tue Jan 18 07:30:59 CET 2011


Ross Lagerwall <rosslagerwall at gmail.com> added the comment:

Attached is a fix to make offset use off_t. This means that mmap will work with offset > 2GB on 32bit systems.

It also fixes that mmap.size() returns the correct value for files > 2GB on 32bit systems.

The first issue of msg78055 was fixed in issue10916, this also fixes the second part, raising an exception if the mmap length is too large instead of mmap()ing an invalid or wrong size.

----------
nosy: +rosslagerwall
Added file: http://bugs.python.org/file20434/mmap.patch

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


More information about the Python-bugs-list mailing list