bug#23983: [PATCH] grep: fix crash with a pattern of alternation of two same characters

2016-07-14 Thread Norihiro Tanaka
Current master crashes with below. $ printf '0\n0' >pat $ printf '0\n' >in $ env LC_ALL=C grep -F pat in grep -F uses memchr2() for each character in this pattern, but if two characters is same, the trie has no child. From 3b004a66cc9dc66ad62111bc38b2c5a2b8bb082c Mon Sep 17 00:00:00 2001 From: No

bug#15444: (no subject)

2016-07-14 Thread Leon Meier
Does the following also fail for you? It uses python instead of (difficult to see in email) explicit spaces to get the 80 spaces. Sorry; in my previous e-mail there was a wraparound induced by the e-mail composer. This one is hopefully better: $ echo "

bug#15444: Bug#456943: (no subject)

2016-07-14 Thread Walter Doekes
Leon Meier wrote: > As of today, the test case [...] still fails in (u)xterm. > Any resolution in sight? I tried to reproduce, and indeed, it fails on xterm (without the 'ne' grep option), but not in gnome-terminal. Does that mean that this is an xterm bug again and not a grep bug? See this: htt

bug#23983: [PATCH] grep: fix crash with a pattern of alternation of two same characters

2016-07-14 Thread Eric Blake
On 07/14/2016 09:07 AM, Norihiro Tanaka wrote: > Current master crashes with below. > > $ printf '0\n0' >pat > $ printf '0\n' >in > $ env LC_ALL=C grep -F pat in > > grep -F uses memchr2() for each character in this pattern, but if two > characters is same, the trie has no child. > > +++ b/src/

bug#23983: [PATCH] grep: fix crash with a pattern of alternation of two same characters

2016-07-14 Thread Eric Blake
On 07/14/2016 09:07 AM, Norihiro Tanaka wrote: > Current master crashes with below. > > $ printf '0\n0' >pat > $ printf '0\n' >in > $ env LC_ALL=C grep -F pat in > > grep -F uses memchr2() for each character in this pattern, but if two > characters is same, the trie has no child. memchr2() shoul

bug#23983: [PATCH] grep: fix crash with a pattern of alternation of two same characters

2016-07-14 Thread Paul Eggert
On 07/14/2016 07:32 PM, Eric Blake wrote: Could you instead do: Something like that should work, but the original patch seems more straightforward. As it happens I installed the attached before seeing your email. The first is the original patch but with comments spruced up a bit, mostly for En

bug#15444: Bug#456943: (no subject)

2016-07-14 Thread Vincent Lefevre
On 2016-07-14 09:02:48 +0200, Walter Doekes wrote: > Leon Meier wrote: > > As of today, the test case [...] still fails in (u)xterm. > > Any resolution in sight? > > I tried to reproduce, and indeed, it fails on xterm (without the 'ne' grep > option), but not in gnome-terminal. > > Does that mean

bug#23989: [PATCH] dfa: Reindent dfa.c

2016-07-14 Thread Norihiro Tanaka
Reindent this like: indent with indent --no-tabs -l79 -Tsize_t -Tbool -Twint_t -Tposition_set -Tmust dfa.c and adjust it. From 0f36f5c5072caafecf1c774fe60d2cc25ab849a9 Mon Sep 17 00:00:00 2001 From: Norihiro Tanaka Date: Fri, 15 Jul 2016 07:44:32 +0900 Subject: [PATCH] dfa: Reindent dfa.c * src/d

bug#15444: (no subject)

2016-07-14 Thread Paul Jackson
Leon wrote: >> Sorry; in my previous e-mail there was a wraparound induced by the e-mail >> composer. This one is hopefully better: >> $ echo " >> "| grep --color=always '[1-9]' >> >> python2 -c 'print " " * 80, 12