GNU bug report logs - #17516
[PATCH] grep: no count newline at the head of a text buffer

Previous Next

Package: grep;

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

Date: Sat, 17 May 2014 01:31:01 UTC

Severity: critical

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: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
Subject: bug#17516: closed (Re: bug#17516: [PATCH] grep: no count newline
 at the head of a text buffer)
Date: Sat, 17 May 2014 05:09:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#17516: [PATCH] grep: no count newline at the head of a text buffer

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 17516 <at> debbugs.gnu.org.

-- 
17516: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17516
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>, 17516-done <at> debbugs.gnu.org
Subject: Re: bug#17516: [PATCH] grep: no count newline at the head of a text
 buffer
Date: Fri, 16 May 2014 22:08:41 -0700
Thanks for catching that; I installed the patch with a slightly reworded 
ChangeLog entry.

[Message part 3 (message/rfc822, inline)]
From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: bug-grep <at> gnu.org
Subject: [PATCH] grep: no count newline at the head of a text buffer
Date: Sat, 17 May 2014 10:20:51 +0900
[Message part 4 (text/plain, inline)]
Severity: critical

When cleared caches of transition tables, number of newline is counted
incorrectly, As a result, grep may crash.

I confirmed crash of grep with a text case in bug#15191

  http://dobrokot.ru/dump/slow_dfa_merge.2013-08-26.tar.gz

  $ env LC_ALL=C time -p src/egrep -f regex.re input_lines.txt

When `p' is beginning, p[-1] is out of the buffer.  Therefore, we
shouldn't count it.

Norihiro
[0001-grep-no-count-newline-at-the-head-of-a-text-buffer.patch (application/octet-stream, attachment)]

This bug report was last modified 11 years and 3 days ago.

Previous Next


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