X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-6.8 required=5.0	tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4D8A3329.7050009@redhat.com>
Date: Wed, 23 Mar 2011 11:51:37 -0600
From: Eric Blake <eblake@redhat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Broken autoconf mmap test
References: <4D8668C6.8020500@cornell.edu> <4D890D95.6090302@redhat.com> <4D891A55.6050601@cornell.edu> <20110323091921.GB10657@calimero.vinschen.de> <4D89D4AA.6070903@cornell.edu> <20110323132622.GM31220@calimero.vinschen.de> <4D89FEC7.3000107@cornell.edu> <20110323154421.GN31220@calimero.vinschen.de> <4D8A308F.508@cornell.edu> <4D8A3206.7070502@redhat.com>
In-Reply-To: <4D8A3206.7070502@redhat.com>
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigE46147A911B27966FD7F9B6F"
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

--------------enigE46147A911B27966FD7F9B6F
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

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.

>=20
> 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.

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


--------------enigE46147A911B27966FD7F9B6F
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJNijMpAAoJEKeha0olJ0NqHucH/i7399XTN8FDUfbhQFkSL9iG
tO5woJ8qPLXQCQ5YpdDWVLprj8wwqxYlEbuhMX8aQtBrOBJ4DhBkxH2CFiQed5/M
zYJgpPzJsXDQXOg0DJiZBRG308bbBQFEHqkk/UZ0tC8WDqLboaYFF1ZQJCloOKOL
yV1Dc8zo7hEoCcDhqFtjb9R2eQxbqkQhsmTixG3DoCfVR88C7z7YnuuTBkovhDcV
Bbb2za1rqtfCieHVtjyM8vqCWYhh3IvWAdtrFaXAEFdKygrH8d0hP0ssn3FCK55Z
ODuI5Q83llzjfXAbZ01r7A0x7hVTXqdpTC3UxCqVSWenXJhFQ50wt71Ts87x6Ns=
=ERwA
-----END PGP SIGNATURE-----

--------------enigE46147A911B27966FD7F9B6F--
