X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Sun, 8 Nov 2009 11:11:19 -0500 From: Christopher Faylor 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) Message-ID: <20091108161119.GB22418@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20091108141548 DOT GB26344 AT calimero DOT vinschen DOT de> <4AF6E91C DOT 1090508 AT bmts DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4AF6E91C.1090508@bmts.com> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 Sun, Nov 08, 2009 at 10:51:56AM -0500, Ralph Hempel wrote: >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... 6. googling for the problem is always a good thing to do. Once it was clear that this was a character set issue in grep it was easy enough to find a fix since it was already in a couple of linux bug trackers. cgf -- 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