GNU bug report logs - #15758
grep 2.15 calls abort() on larger searches with -P

Previous Next

Package: grep;

Reported by: Dave Reisner <dreisner <at> archlinux.org>

Date: Wed, 30 Oct 2013 17:40:05 UTC

Severity: normal

Merged with 15759

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #22 received at 15758 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Dave Reisner <d <at> falconindy.com>
Cc: 15759 <at> debbugs.gnu.org, 15758 <at> debbugs.gnu.org,
 Dave Reisner <dreisner <at> archlinux.org>,
 Stefano Lattarini <stefano.lattarini <at> gmail.com>
Subject: Re: bug#15758: grep 2.15 calls abort() on larger searches with -P
Date: Tue, 5 Nov 2013 08:17:15 -0800
On Mon, Nov 4, 2013 at 11:38 AM, Dave Reisner <d <at> falconindy.com> wrote:
> On Sat, Nov 02, 2013 at 04:05:52PM -0700, Jim Meyering wrote:
>> On Thu, Oct 31, 2013 at 8:26 AM, Jim Meyering <jim <at> meyering.net> wrote:
>> ...
>> > With this and the nit about --version output being wrong, I now have
>> > two reasons to make a new release.
>>
>> Thanks again for the report, Dave.
>> Here's the fix I expect to push:
>
> Thanks Jim.
>
> Apologies for not responding to this sooner. I tested your patch and can
> confirm that the behavior is better, but the new behavior still seems
> like a regression. Take, for example, the simple instance of grep'ing
> grep's own git repo.
>
> # with grep 2.14
> $ grep -rPw GNULIB
> gnulib/m4/bison.m4:dnl Declaring YACC & YFLAGS precious will not be necessary after GNULIB
> gnulib/lib/glob.c:   HAVE_STRUCT_DIRENT_D_TYPE plays the same role in GNULIB.  */
> gnulib/lib/netdb.in.h:   GNULIB getaddrinfo() replacement, so are not yet needed.
> gnulib/lib/argp.h:/* GNULIB makes sure both program_invocation_name and
>
> # with grep built from HEAD
> $ ./src/grep -rPw GNULIB
> ./src/grep: invalid UTF-8 byte sequence in input
>
> I would expect that the invalid UTF-8 wouldn't stop grep cold, but
> continue on, ignoring the non-matching data, just as grep without the -P
> flag does.

Hi Dave,

I agree, and so does pcregrep.  There are a few other problems with
grep's PCRE driver code: for example, a problem (no matter how serious)
in one file should not cause the entire grep run to exit; grep should
continue processing remaining files. And when grep reports the problem,
it should include at least the file name in the diagnostic.

I will fix those before the upcoming snapshot.

Thanks,
Jim




This bug report was last modified 11 years and 122 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.