GNU bug report logs - #24941
Early termination bug in grep 2.26

Previous Next

Package: grep;

Reported by: Gary Johnson <garyjohn <at> spocom.com>

Date: Mon, 14 Nov 2016 02:42:01 UTC

Severity: normal

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: Paul Eggert <eggert <at> cs.ucla.edu>
To: Jim Meyering <jim <at> meyering.net>, Norihiro Tanaka <noritnk <at> kcn.ne.jp>
Cc: 24941 <at> debbugs.gnu.org
Subject: bug#24941: Early termination bug in grep 2.26
Date: Tue, 15 Nov 2016 15:33:13 -0800
On 11/15/2016 03:13 PM, Jim Meyering wrote:
>    We should retain the optimization when reading from stdin that is
> neither a pipe nor a tty.

I am toying with the idea of retaining the optimization only if 
lseek-to-EOF succeeds, a heuristic that is a bit more restrictive. This 
arguably would conform better to the POSIX requirement that when grep 
exits "the file offset in the open file description is properly 
positioned just past the last byte processed by the utility." See the 
INPUT FILES section of 
<http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap01.html#tag_17_04>.





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

Previous Next


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