Maxim Yanchenko <maxim.yanche...@gs.com> added the comment:

Well, "n+1" is clearly outside the file, wile "n" is within and therefore valid.

Also, if your position is to forbid zero-size mmapping completely, then the 
checks inside "if (map_size == 0) {" don't make any sense, especially as they 
may or may fail.
>From the existing code, zero-size mmapping is OK as long as offset is OK, so 
>the question is whether we consider offset pointing to the end of the file OK. 
>To me, it's fine and valid, and there are valid cases like NumPy's zero-size 
>arrays, hence the proposed patch.

Removing the check completely is a viable option too, it was already requested 
for special files:
http://bugs.python.org/issue12556

I believe users should have an ability to enjoy whatever their OS provides, and 
"deal with the consequences" as you said.

----------

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

Reply via email to