Richard Oudkerk added the comment:

> This change is not backward compatible. Now user can mmap a larger file 
> and safely access lower 2 GiB. With the patch it will fail.

They should specify length=2GiB-1 if that is what they want.

With length=0 you can only access the lower 2GiB if "file_size % 4GiB > 2GiB".  
If the file size is 4GiB+1 then you can only access *one byte* of the file.  
And if "2GiB < file_size < 4GiB" then presumably len(data) will be negative (or 
throw an exception or fail an assertion -- I have not tested that case).  I 
would not be surprised if crashes are possible.

Basically if you had a "large" file and you did not hit a problem then it was 
Windows specific dumb luck.  I see no point in retaining such unpredictable 
behaviour.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16743>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to