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: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Shlomi Fish <shlomif <at> shlomifish.org>
Subject: bug#18806: closed (Re: 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 20:39:05 +0000
[Message part 1 (text/plain, inline)]
Your bug report

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

which was filed against the grep package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 18806 <at> debbugs.gnu.org.

-- 
18806: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18806
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Norihiro Tanaka <noritnk <at> kcn.ne.jp>, 18806-done <at> debbugs.gnu.org
Cc: Shlomi Fish <shlomif <at> shlomifish.org>
Subject: Re: 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 13:38:19 -0700
[Message part 3 (text/plain, inline)]
Thanks for looking into this.  I added that test case, but took a 
more-conservative approach to fixing the bug, by disabling the 
optimization that's causing this problem; please see attached patches.  
The optimization was a hack anyway, and these bugs suggest that it's not 
a hack worth keeping.
[0001-grep-fix-grep-P-crash.patch (text/x-patch, attachment)]
[0002-tests-add-test-for-grep-P-fix.patch (text/x-patch, attachment)]
[Message part 6 (message/rfc822, inline)]
From: Shlomi Fish <shlomif <at> shlomifish.org>
To: bug-grep <at> gnu.org
Subject: grep -rP getline crashes prematurely (without displaying all
 results) on invalid UTF-8 input with LC_ALL=en_US.UTF-8
Date: Thu, 23 Oct 2014 14:15:16 +0300
Hi all,

see:

https://github.com/shlomif/grep-bug-big5-utf8-from-IO-All

You can cd to the directory and run "bash -x REPRODUCE.bash" (After seeing
that it does not do anything harmful). I am getting:

shlomif <at> telaviv1:~/GREP-test$ LC_ALL=en_US.UTF-8 grep -rP getline grep-test/

grep-test/round_robin.t:while (my $line = $io->getline || $io->getlinegrep:
internal PCRE error: -32

with the latest git grep.

Regards,

	Shlomi Fish
-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
UNIX Fortune Cookies - http://www.shlomifish.org/humour/fortunes/

Xena the warrior princess can meet King David for breakfast and Julius Caesar
for lunch. Without time travel.

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



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

Previous Next


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