This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MMAP issue on cygwin


Florian Weimer <fw@deneb.enyo.de> writes:

> (Just an example of what can go wrong: IIRC, the INN optimization for
> the active file breaks if the file size is a multiple of the page size
> (and the above semantics are implemented.)

That's because it used to rely on zero-fill behavior and used C string
functions, hoping that zero-fill would provide the trailing nul.  This
works unless the active file is an exact multiple of the page size, in
which case reading that extra character causes a segmentation fault or bus
error depending on the architecture and implementation.

I believe this was fixed a while back.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]