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