Subject: bug#17516: closed (Re: bug#17516: [PATCH] grep: no count newline at the head of a text buffer)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 17 May 2014 05:09:03 +0000

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 [email-masked].

-- 
17516: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17516
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#17516: [PATCH] grep: no count newline at the head of a text buffer
From: Paul Eggert <[email-masked]>
To: Norihiro Tanaka <[email-masked]>, [email-masked]
Date: Fri, 16 May 2014 22:08:41 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Thanks for catching that; I installed the patch with a slightly reworded 
ChangeLog entry.

Subject: [PATCH] grep: no count newline at the head of a text buffer
From: Norihiro Tanaka <[email-masked]>
To: [email-masked]
Date: Sat, 17 May 2014 10:20:51 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

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