GNU bug report logs - #18806
grep -rP getline crashes prematurely (without displaying all results) on invalid UTF-8 input with LC_ALL=en_US.UTF-8

Previous Next

Package: grep;

Reported by: Shlomi Fish <shlomif <at> shlomifish.org>

Date: Thu, 23 Oct 2014 11:16:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Shlomi Fish <shlomif <at> shlomifish.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 18806 <at> debbugs.gnu.org
Subject: bug#18806: grep -rP getline crashes prematurely (without displaying all results) on invalid UTF-8 input with LC_ALL=en_US.UTF-8
Date: Fri, 24 Oct 2014 12:26:32 +0300
Hi Mr. Eggert,

On Thu, 23 Oct 2014 14:06:32 -0700
Paul Eggert <eggert <at> cs.ucla.edu> wrote:

> On 10/23/2014 04:15 AM, Shlomi Fish wrote:
> > internal PCRE error: -32
> >
> > with the latest git grep.
> 
> I am not seeing a problem with that test case on my platform.  I am 
> running Fedora 20 x86-64, and compiled grep with GCC 4.9.1 (which I 
> built myself) and linked with the standard Fedora package 
> pcre-8.33-6.fc20.x86_64.  I also tried building with the Fedora GCC in 
> 32-bit mode, and couldn't reproduce the bug there either.
> 
> Possibly it's a libpcre problem?

I discovered a slightly different test case for it. Try running:

«
`which grep` --color -rP getline grep-test
»

From the command line. See this for a screenshot on Fedora:

* http://www.shlomifish.org/Files/files/images/gnu-grep-on-fedora.png

> 
> I tested with grep commit b2490802defe3c3bf7ef0036a4515d006a08a769 and 
> grep-bug-big5-utf8-from-IO-All commit 
> 9469e6e5be97d631c02bcfdbe814f43d1bb2df56.

I tested with grep commit b2490802defe3c3bf7ef0036a4515d006a08a769 .

Regards,

	Shlomi Fish


-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
http://www.shlomifish.org/humour/bits/facts/Summer-Glau/

Tomorrow never dies, unless Chuck Norris volunteers to take it out of its
misery.
    — http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/

Please reply to list if it's a mailing list post - http://shlom.in/reply .




This bug report was last modified 10 years and 209 days ago.

Previous Next


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