X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <4AF716DB.8060904@cwilson.fastmail.fm> Date: Sun, 08 Nov 2009 14:07:07 -0500 From: Charles Wilson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Broken autoconf mmap test (was Re: 1.7] BUG - GREP slows to a crawl with large number of matches on a single file) References: <20091108141548 DOT GB26344 AT calimero DOT vinschen DOT de> In-Reply-To: <20091108141548.GB26344@calimero.vinschen.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 Corinna Vinschen wrote: > On Nov 8 14:56, Corinna Vinschen wrote: >> Btw., the check for mmap in grep's configure file is broken. It tries >> to mmap to a fixed address formerly allocated via malloc(). This doesn't >> work on Windows. An autoconf run with a newer version of autoconf would >> be nice. > > I just found that the latest autoconf *still* has this broken test > for mmap, which basically calls > > data2 = malloc (size); > mmap(data2, ...); > > Why has this test never been fixed? Chuck? ...err, 'cause I didn't realize it was a problem. I see that cygport has hidden this for years: # AC_HAVE_MMAP fails despite a working mmap, so we force this to yes # (see http://www.cygwin.com/ml/cygwin/2004-09/msg00741.html # and following thread for details) export ac_cv_func_mmap_fixed_mapped=yes; NTTAWWT, but it never triggered my "gee I ought to fix that" reflex. I agree this should be fixed, but I'm leery of changing an autoconf test without knowing how that change will affect the other 9,236 platforms that may depend on the current behavior, esp. given my current (lack of) knowledge about how mmap is *supposed* to work in the various MAP_* modes. I think this is an issue for the autoconf list as a whole. Would you -- or Eric -- care to raise it there? Especially as you seemed to have quite strong feelings about it back in 2004: http://www.cygwin.com/ml/cygwin/2004-09/msg00753.html > The mmap test is crap. How can an application expect to be able to > access just about every address together with MAP_FIXED? > > Consequentially MapViewOfFileEx returns error 487 in these cases, > "Attempt to access invalid address." > > That's just another example of a crappy autoconf mmap test. -- Chuck -- 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