NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/39258: fgrep -w is broken



>Number:         39258
>Category:       bin
>Synopsis:       fgrep -w is broken
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 31 20:15:00 +0000 2008
>Originator:     Perry E. Metzger
>Release:        NetBSD 4.99.28
>Organization:
Perry E. Metzger                perry%piermont.com@localhost
>Environment:
        
        
System: NetBSD snark.cb.piermont.com 4.99.28 NetBSD 4.99.28 (ZWEI) #0: Sun Aug 
12 13:52:43 EDT 2007 
perry%snark.piermont.com@localhost:/usr/src/sys/arch/amd64/compile/ZWEI amd64
Architecture: x86_64
Machine: amd64
>Description:

fgrep -w does not reliably work. I've tested x86 and amd64 boxes and
it seems to fail identically, and it appears to fail on 4.0 as well as
on -current. It fails with several versions of the fgrep sources (as
checked out by cvs and compiled) including the latest from today.

It does not fail reliably -- some files work, some do not. The
behavior is clearly wrong though, and this has been verified by hand
by several people and also by trying the same files on other OSes
where the expected results happen.

>How-To-Repeat:

Go into /usr/src/sys/ufs/ufs on a -current machine and type

  $ fgrep -w direct dir.h

and observe the lack of output. (Note that other files will work fine
for similar tests.)

This seems to be a state machine issue of some sort -- if you alter
the contents of the file, you can get it to work or fail in different
places.

>Fix:
        

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index