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: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: 17516 <at> debbugs.gnu.org
Subject: bug#17516: [PATCH] grep: no count newline at the head of a text buffer
Date: Sat, 17 May 2014 10:20:51 +0900
[Message part 1 (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 4 days ago.

Previous Next


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