bitwiseworks / libcx

kLIBC Extension Library
GNU Lesser General Public License v2.1
11 stars 1 forks source link

Support mapping beyond file EOF #18

Closed dmik closed 8 years ago

dmik commented 8 years ago

It seems that most platforms (namely, Linux) support mapping a region that lasts beyond the end of an associated file, examples are the standard autoconf mmap test (see #12) and VirtualBox mmap test (#14). We need to support it too.

dmik commented 8 years ago

It's clear from the above test cases that reading beyond EOF should return zeroes. It's unclear however if writing beyond EOF for MAP_SHARED mappings should cause file expansion or be simply ignored. A test is needed to check that.