[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-grep] Re: grep: very large file with no newline causes trouble
From: |
Jim Meyering |
Subject: |
Re: [bug-grep] Re: grep: very large file with no newline causes trouble |
Date: |
Mon, 22 Nov 2004 22:57:47 +0100 |
Stepan Kasal <address@hidden> wrote:
> On Sat, Nov 20, 2004 at 05:54:34PM +0100, Jim Meyering wrote:
>> Here, I suggest you just set errno not to saved_errno
>> but rather to ENOMEM, since saved_errno's value is not useful.
>
> yes, you are right. I attached an updated version of the patch.
>
> Is anyone willing to test it?
I've confirmed that it works, ...
$ dd bs=1 seek=4G of=big < /dev/null
$ (ulimit -v 10000; echo a|src/grep a big -)
grep: big: Cannot allocate memory
(standard input):a
[Exit 2]
but bear in mind that my working directory is pretty hacked up: since
I couldn't get it to configure/build I pulled in bison's bootstrap
script and impatiently and recklessly chopped (removing lots of
conflicting/old/dos-related .m4 files) until everything compiled.