X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 	tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4AF6E91C.1090508@bmts.com>
Date: Sun, 08 Nov 2009 10:51:56 -0500
From: Ralph Hempel <rhempel@bmts.com>
User-Agent: Thunderbird 2.0.0.6 (X11/20071022)
MIME-Version: 1.0
To: cygwin@cygwin.com, cygwin@cygwin.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.GB26344@calimero.vinschen.de>
In-Reply-To: <20091108141548.GB26344@calimero.vinschen.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-brucetelecom.com-MailScanner-Information: Please contact Bruce Telecom 519.368.2000 for more information
X-brucetelecom.com-MailScanner: Found to be clean
X-brucetelecom.com-MailScanner-From: rhempel@bmts.com
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

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?

I can't answer that question but this thread points out very important
lessons in debugging specifically and projects in general.

1. Easily reproducible test cases are critical to getting somone
    interested in fixing your problem.

2. Having the good fortune to have somebody run the test case and
    duplicate the problem helps a bit more.

3. Having that person challenge the assumptions under which the code
    has been working for YEARS without a complaint helps a bit more.

4. Having that person do a great analysis that shows why the problem
    exists helps even more.

5. Going even one step further and trying to figure out why the
    problem has existed for years and what else might be wrong is
    just the icing on the cake.

Bravo Corinna - on a Sunday no less...

Cheers, Ralph

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

