Bug 14968 – Invalid mmfile length allowed on Linux
Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2015-08-26T22:06:00Z
Last change time
2015-09-01T11:45:29Z
Assigned to
nobody
Creator
rsw0x
Comments
Comment #0 by rsw0x — 2015-08-26T22:06:34Z
From the linux manpage on mmap:
"ERRORS
...
EINVAL (since Linux 2.6.12) length was 0."
Default length is 0 for mmfile, and 0 is an accepted number.
This should probably throw an exception.
See: http://forum.dlang.org/post/[email protected]
Comment #1 by nakata — 2015-08-27T02:30:20Z
From OS X 10.10.3 manage on mmap:
ERRORS
...
[EINVAL] The len argument was negative.
Comment #2 by dlang-bugzilla — 2015-09-01T10:58:24Z
I don't see anything actionable here. If the OS reports an error, the error will be propagated as an exception back to the user. Why does D need to do additional checking if the OS already does that anyway?
Comment #3 by dlang-bugzilla — 2015-09-01T11:45:29Z