[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep -A1 -m1 segfaults with multiple line matches bug
From: |
Benno Schulenberg |
Subject: |
Re: grep -A1 -m1 segfaults with multiple line matches bug |
Date: |
Fri, 23 Feb 2007 23:47:00 +0100 |
User-agent: |
KMail/1.9.6 |
Justin Pryzby wrote:
> On Fri, Feb 23, 2007 at 07:28:22PM +0100, Benno Schulenberg wrote:
> > Confirmed on Feisty:
> >
> > # { echo h; echo yz; } | grep -A1 -m1 "`echo h; echo zz`"
> > h
> > Segmentation fault
Hmm, it also segfaults on Gentoo when using the Posix locale:
$ { echo h; echo yz; } | LC_ALL=C grep -A1 -m1 "`echo h; echo zz`"
h
Segmentation fault
After applying the 65-dfa-optional.patch (after all the preceding
ones) the segfault also happens when using a utf8 locale.
The problem is apparently fixed in grep's CVS:
~/Sources/grep-cvs $ { echo h; echo yz; } | LC_ALL=C src/grep -A1 -m1 "`echo h;
echo zz`"
h
yz
~/Sources/grep-cvs $ { echo h; echo yz; } | LC_ALL=nl_NL.utf8 src/grep -A1 -m1
"`echo h; echo zz`"
h
yz
But which of the many changes since 2.5.1 is responsible for avoiding
the segfault is beyond me.
Benno