This is the mail archive of the cygwin mailing list for the Cygwin 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: Broken autoconf mmap test


On 03/23/2011 11:46 AM, Eric Blake wrote:
> On 03/23/2011 11:40 AM, Ken Brown wrote:
>>> Usually it shouldn't.  While you can write into a mmaped area beyond
>>> EOF up to the end of the last page, it doesn't make a lot of sense.
>>> The data will never show up in the mapped file.

Hmm, rereading POSIX:

If the size of the mapped file changes after the call to mmap( ) as a
result of some other operation
on the mapped file, the effect of references to portions of the mapped
region that correspond to
added or removed portions of the file is unspecified.

> 
> Unless the right thing to do in autoconf is to separate the test into
> two levels; one of whether most mmap works but you can't extend files
> (cygwin always passes) and one whether writing beyond EOF works as
> required by POSIX (cygwin currently fails on W64, but hopefully fewer
> packages rely on this stricter behavior).  Or figure out a way to make
> cygwin work around the W64 limitations.

I'm still debating if cygwin is compliant and the autoconf test is
exploiting undefined behavior... this is tricky stuff to get right.

-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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