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

Previous Next

Package: grep;

Reported by: Norihiro Tanaka <noritnk <at> kcn.ne.jp>

Date: Thu, 14 Jul 2016 15:08:01 UTC

Severity: normal

Tags: patch

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: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#23983: closed ([PATCH] grep: fix crash with a pattern of
 alternation of two same characters)
Date: Thu, 14 Jul 2016 18:01:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 14 Jul 2016 20:00:35 +0200
with message-id <5787D343.4080208 <at> cs.ucla.edu>
and subject line Re: bug#23983: [PATCH] grep: fix crash with a pattern of alternation of two same characters
has caused the debbugs.gnu.org bug report #23983,
regarding [PATCH] grep: fix crash with a pattern of alternation of two same characters
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
23983: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23983
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: <bug-grep <at> gnu.org>
Subject: [PATCH] grep: fix crash with a pattern of alternation of two same
 characters
Date: Fri, 15 Jul 2016 00:07:13 +0900
[Message part 3 (text/plain, inline)]
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.
[0001-grep-fix-crash-with-a-pattern-of-alternation-of-two-.patch (text/plain, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eric Blake <eblake <at> redhat.com>, Norihiro Tanaka <noritnk <at> kcn.ne.jp>,
 23983-done <at> debbugs.gnu.org
Subject: Re: bug#23983: [PATCH] grep: fix crash with a pattern of alternation
 of two same characters
Date: Thu, 14 Jul 2016 20:00:35 +0200
[Message part 6 (text/plain, inline)]
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 English. The second is a minor style change.
[0001-grep-fix-F-crash-when-alternating-duplicates.patch (text/x-patch, attachment)]
[0002-grep-minor-style-changes-for-F-crash-fix.patch (text/x-patch, attachment)]

This bug report was last modified 8 years and 364 days ago.

Previous Next


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