Subject: Re: bin/8681: grep may bomb out with "memory exhausted"
To: Simon Burge <email@example.com>
From: Charles M. Hannum <firstname.lastname@example.org>
Date: 10/28/1999 07:20:38
Simon Burge <email@example.com> writes:
> Personally, I'd be happy to put the size limit in and put a note in the
> man page stating "you may have problems if you are searching for a regex
> that is greater than 4MB, or if you want to see a line greater than 2MB
> long that has a match". This doesn't seem unreasonable to me...
It is completely unreasonable to introduce an arbitrary limit like
this and make the failure mode `silently do the wrong thing'. If
you're going to intentionally make grep(1) do something other than
what it's documented and expected to do, then it should at least fail
with a message explaining what happened and how to work around it.