[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-grep] segfault bug running grep -P when pattern matches last eo
From: |
Stepan Kasal |
Subject: |
Re: [bug-grep] segfault bug running grep -P when pattern matches last eol |
Date: |
Thu, 24 Feb 2005 10:13:07 +0100 |
User-agent: |
Mutt/1.4.1i |
Hello,
first, I'd like to thank Tim for his bug report.
Second, I'd like to check Claudio for his analysis and for the patch.
On Tue, Feb 22, 2005 at 07:08:40PM +0100, Claudio Fontana wrote:
> I've investigated the problem about the grep -P
> segfault bug further, and I've understood that it
> happens when the perlre pattern matches the last eol.
>
> What happens is that the current code (in
> search.c::Pexecute()) assumes that a newline is always
> present after the match.
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.
But since Claudio's fix is straighforward and does affect only the
pcre-specific parts of code, I checked it in to the CVS.
Thanks again,
Stepan