X-Spam-Check-By: sourceware.org
X-YMail-OSG: 5ZJniDAVM1kTEjBnqIMfBiVPcTuTG.Nve8ZalmVBL6.59_XKsMPnZsP1TjcDvg5NE0Ce_Sd5RJ3.lKAX7gt62SCsK06TafZKESG87LiB47tA9C7lrCg6asqI4WqHND1dLbHXrWY4ImQYV1E-
Date: Fri, 26 Jan 2007 15:28:39 -0800 (PST)
From: Frodak <frodak17@yahoo.com>
Subject: Re: grep -P segfault
To: cygwin@cygwin.com
Cc: bug-grep@gnu.org
In-Reply-To: <45BA88EF.FC91A2E7@dessent.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Message-ID: <336939.45912.qm@web58615.mail.re3.yahoo.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@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


--- Brian Dessent wrote:

> Brian Dessent wrote:
> 
> > Right before calling memchr, beg points to the
> first byte in the string
> > "hello\n", end points to the \n character, and so
> does buflim.  Thus
> > (buflim - end) is zero, and memchr returns NULL. 
> From there match_size
> > is miscalculated and from there it's all downhill.
>  The test for EOL
> > should be skipped if buflim == end.
> 
> I see this is an old bug, reported and fixed in CVS
> nearly two years
> ago:
> 
>
http://lists.gnu.org/archive/html/bug-grep/2005-02/msg00052.html
> http://savannah.gnu.org/bugs/?4531
> 
> And yet apparently the last released version is
> still 2.5.1a from
> 19-Nov-2004.  Sigh.
> 
> Brian
> 

That same email states:
"Generally, the -P option is only an experimental
feature, which can
crash in some cases, especially when you use the more
complicated
features of Perl regexps."



 
____________________________________________________________________________________
Food fight? Enjoy some healthy debate 
in the Yahoo! Answers Food & Drink Q&A.
http://answers.yahoo.com/dir/?link=list&sid=396545367

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

