MMAP issue on cygwin

Russ Allbery rra@stanford.edu
Tue Jan 1 20:30:00 GMT 2002


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/>



More information about the Gcc mailing list