--- Begin Message ---
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:
address@hidden:~/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 .
--- End Message ---
--- Begin Message ---
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 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
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
Description: Text Data
0002-tests-add-test-for-grep-P-fix.patch
Description: Text Data
--- End Message ---