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: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 18806-done <at> debbugs.gnu.org, Shlomi Fish <shlomif <at> shlomifish.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: Sat, 25 Oct 2014 08:58:02 +0900
Paul Eggert <eggert <at> cs.ucla.edu> wrote:
> The optimization was a hack anyway, and these bugs suggest that it's>
> not a hack worth keeping.

Thanks.  I improved this hack instead of removal, but it had little
effect in comparison with your patch, even if `execute' ran for each
character.

$ yes j | head -1000000 >k

(Current master): 
$ time -p src/grep -Po j ../k >/dev/null
real 0.46  user 0.40  sys 0.02

(My patch):
$ time -p src/grep -Po j ../k >/dev/null
real 0.46  user 0.41  sys 0.01





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.