X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_00,SPF_NEUTRAL,TW_YG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <4D8A308F.508@cornell.edu> Date: Wed, 23 Mar 2011 13:40:31 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Broken autoconf mmap test References: <4D8668C6 DOT 8020500 AT cornell DOT edu> <4D890D95 DOT 6090302 AT redhat DOT com> <4D891A55 DOT 6050601 AT cornell DOT edu> <20110323091921 DOT GB10657 AT calimero DOT vinschen DOT de> <4D89D4AA DOT 6070903 AT cornell DOT edu> <20110323132622 DOT GM31220 AT calimero DOT vinschen DOT de> <4D89FEC7 DOT 3000107 AT cornell DOT edu> <20110323154421 DOT GN31220 AT calimero DOT vinschen DOT de> In-Reply-To: <20110323154421.GN31220@calimero.vinschen.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 3/23/2011 11:44 AM, Corinna Vinschen wrote: > On Mar 23 10:08, Ken Brown wrote: >> On 3/23/2011 9:26 AM, Corinna Vinschen wrote: >>> Btw., I just experimented with another flag which has not been exposed >>> to the Win32 API, and which is not officially documented. It's called >>> AT_EXTENDABLE_FILE and allows to specify a view which is bigger than >>> the filesize. I tried this on W7-64, and it works. Just not exactly >>> as we need it. The trailing pages are not commited but only reserved, >>> so accessing them still results in a SEGV. And while commiting them >>> allows to run the autoconf testcase, it also changes the filesize of >>> the file on disk. Oh well. >> >> Is the scenario in which the autoconf test fails likely to occur in >> practice? I wonder if it could be responsible for some of the >> mysterious crashes that people have reported on 64-bit systems. > > 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. > > I have no idea if there are applications out there which rely on this > crude behaviour. I was mainly thinking of this from the point of view of a Cygwin package maintainer. In view of what you said, it seems that it's probably safe to continue using the workaround export ac_cv_func_mmap_fixed_mapped=yes that's built into cygport. Maintainers who don't use cygport and who build on a 64-bit system will have to manually use a similar workaround, or else their builds won't use mmap. It doesn't look like there's going to be an autoconf change to resolve this: http://lists.gnu.org/archive/html/autoconf/2011-03/msg00041.html Ken -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple