bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: gawk long lines bug?


From: dslate
Subject: Re: gawk long lines bug?
Date: 17 Feb 2002 18:14:14 -0000

To: address@hidden address@hidden address@hidden address@hidden
Subject: Re: gawk long lines bug?
Reply-To: address@hidden

Arnold,

Thanks for your response to my gawk bug report.  Because both gawk and sed
failed on a similar task I assumed that the problem had something to do with
the underlying regular expression package.  But I still don't understand why
it fails to allocate enough memory, since the machines involved have many
hundreds of megabytes of available VM.  Is there some kind of built-in limit
to the amount regex is willing to allocate?

Perhaps I will follow your suggestion to try mawk.  Many years ago I used
mawk on DEC workstations, but it had some limitations, so I switched to
gawk, and have used it ever since, mostly on PC's.

-- Dave Slate


> The problem is that the regex routines return -2 indicating that they
> couldn't allocate enough memory to handle the long string, but gawk
> doesn't catch it.  The following patch "fixes" this, and gawk at least now
> dies with a reasonable error message instead of with an internal error.
> 
> I notice that both the Bell Labs awk and mawk can handle your program
> and data just fine.  That gawk can't is a problem in the regex routines.
> Unfortunately, *that* code is way out of my league (fools rush in where
> angels fear to tread, so to speak), and I don't expect a fix to regex
> anytime soon.
> 
> I suspect that something similar is happening in GNU sed, but I haven't
> looked at its code.
> 
> If you don't need any of the gawk extensions, I suggest you switch to
> using mawk.
> 
> Thanks,
> 
> Arnold Robbins



reply via email to

[Prev in Thread] Current Thread [Next in Thread]