kern/68765: [mmap] a little data can be stored beyond EOF.

das at FreeBSD.org das at FreeBSD.org
Sun Jun 29 17:01:59 UTC 2008


Synopsis: [mmap] a little data can be stored beyond EOF.

State-Changed-From-To: open->closed
State-Changed-By: das
State-Changed-When: Sun Jun 29 16:59:31 UTC 2008
State-Changed-Why: 
This is not a bug; it is documented behavior, and other systems behave
the same way. From the first paragraph of mmap(3):

     If len is not a multiple of the page-
     size, the mapped region may extend past the specified range.  Any such
     extension beyond the end of the mapped object will be zero-filled.

The reason for this behavior is that on most architectures it isn't possible
to define a virtual memory protection boundary smaller than a page.

http://www.freebsd.org/cgi/query-pr.cgi?pr=68765


More information about the freebsd-bugs mailing list