Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Feb 2004 07:44:46 -0700
From:      Robin Schoonover <end@endif.cjb.net>
To:        freebsd-current@freebsd.org
Subject:   Re: grep bug
Message-ID:  <20040209144449.A982643D1D@mx1.FreeBSD.org>
In-Reply-To: <200402090704.i1974IVa032065@the-macgregors.org>
References:  <20040209023623.GA30071@xor.obsecurity.org> <200402090704.i1974IVa032065@the-macgregors.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 9 Feb 2004 07:04:18 -0000, Rob MacGregor wrote:
> > -----Original Message-----
> > From: owner-freebsd-current@freebsd.org 
> > [mailto:owner-freebsd-current@freebsd.org] On Behalf Of Kris Kennaway
> > Sent: 09 February 2004 02:36
> > 
> > kkenn@rot13:~ grep -r foo / > /dev/null
> > grep: /dev/network: Permission denied
> > grep: /dev/geom.ctl: Permission denied
> > grep: /dev/devctl: Permission denied
> > grep: /dev/ata: Permission denied
> > grep: /dev/console: Permission denied
> > grep in realloc(): error: allocation failed
> > ^C^C^CAbort (core dumped)
> 
> I can confirm this behaviour under 5.2-CURRENT from the 5th of February:
> 

Ah, yes, but 5.1-RELEASE's grep won't core dump.

end@rogue(/home/end) % grep -r foo /
grep: /dev/network: Permission denied
grep: /dev/geom.ctl: Operation not supported by device
grep: /dev/devctl: Permission denied
grep: /dev/ata: Permission denied
grep: memory exhausted
end@rogue(/home/end) % 

It simply tries snarfing in the line, notices it has no more memory for
more line, complains, and quits.  Instead of core dumping.

-- 
Robin Schoonover (aka End)
#
# Save the Rainforest! Eat a vegetarian!
#



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040209144449.A982643D1D>