From nobody@FreeBSD.org  Sun Mar 20 22:21:25 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4FAB616A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 20 Mar 2005 22:21:25 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2CB3F43D39
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 20 Mar 2005 22:21:25 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j2KMLOHa088108
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 20 Mar 2005 22:21:24 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j2KMLOqM088090;
	Sun, 20 Mar 2005 22:21:24 GMT
	(envelope-from nobody)
Message-Id: <200503202221.j2KMLOqM088090@www.freebsd.org>
Date: Sun, 20 Mar 2005 22:21:24 GMT
From: martinko <gamato@pobox.sk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: grep(1) - strange behaviour (most likely a bug) -- `grep -i --colour ""`
X-Send-Pr-Version: www-2.3

>Number:         79063
>Category:       bin
>Synopsis:       grep(1) - strange behaviour (most likely a bug) -- `grep -i --colour ""`
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    tjr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 20 22:30:02 GMT 2005
>Closed-Date:    Thu May 03 23:11:16 GMT 2007
>Last-Modified:  Thu May 03 23:11:16 GMT 2007
>Originator:     martinko
>Release:        5.3R-p5
>Organization:
>Environment:
FreeBSD mb-aw1n-bsd 5.3-RELEASE-p5 FreeBSD 5.3-RELEASE-p5 #5: Mon Feb 14 19:45:04 CET 2005     root@mb-aw1n-bsd:/usr/obj/usr/src/sys/MB-AW1N  i386

>Description:
      `grep -i --colour ""` runs mad and seems to generate ansi escape codes in a (infinite?) loop. it happens only when using empty ("") search string and both parameters (-i and --colour) are used.
pls find my orginal description below as posted to freebsd-questions mailing list. i also produced a typescript with script(1) which you may find under the 2nd link/post.

http://lists.freebsd.org/pipermail/freebsd-questions/2005-March/081083.html
http://lists.freebsd.org/pipermail/freebsd-questions/2005-March/081202.html

>How-To-Repeat:
      just run the following:
grep -i --colour ""
as soon as you type the first letter it gets mad and soon you'll have a huge typescript file as you can see in the link above.
codes/chars generated (as output on screen) seem to be random but i'm not sure about it.
>Fix:
      sorry, i've no idea. but if you need my assistence just let me know pls.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: tjr 
State-Changed-When: Sat May 14 05:35:28 GMT 2005 
State-Changed-Why:  
Fixed in -current, with MFC to 5-stable due after the recent grep 
changes have had some time to settle. 


Responsible-Changed-From-To: freebsd-bugs->tjr 
Responsible-Changed-By: tjr 
Responsible-Changed-When: Sat May 14 05:35:28 GMT 2005 
Responsible-Changed-Why:  
Fixed in -current, with MFC to 5-stable due after the recent grep 
changes have had some time to settle. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=79063 

From: Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
To: bug-followup@FreeBSD.org, gamato@pobox.sk
Cc:  
Subject: Re: bin/79063: grep(1) - strange behaviour (most likely a bug) --
	`grep -i --colour ""`
Date: Tue, 01 May 2007 11:34:19 +0100

 I cannot recreate this on on 6.2-R as it was fixed in -CURRENT before
 -CURRENT became RELENG-6, but the changes were never merged back to 5.x.
 I'm guessing that the merging of a new grep into RELENG-5 won't be
 happening now, so this PR can probably be closed.

From: =mato= <gamato@pobox.sk>
To: Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
Cc: bug-followup@FreeBSD.org
Subject: Re: bin/79063: grep(1) - strange behaviour (most likely a bug) --
 `grep -i --colour ""`
Date: Thu, 03 May 2007 00:51:36 +0200

 Gavin Atkinson wrote:
 > I cannot recreate this on on 6.2-R as it was fixed in -CURRENT before
 > -CURRENT became RELENG-6, but the changes were never merged back to 5.x.
 > I'm guessing that the merging of a new grep into RELENG-5 won't be
 > happening now, so this PR can probably be closed.
 >
 >
 >
 >   
 
 I'm not using 5.x anymore.
 
 M.
State-Changed-From-To: patched->closed 
State-Changed-By: linimon 
State-Changed-When: Thu May 3 23:10:17 UTC 2007 
State-Changed-Why:  
This was never merged to RELENG_5, but our advice to users is to migrate 
to RELENG_6 at this point.  Since tjr is no longer a committer, let's just 
close this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=79063 
>Unformatted:
