Memory allocation problem with Gawk 3.1.2

Jeremy Utley jeremy at jutley.org
Fri Jun 13 09:19:26 PDT 2003


OK, thanks to both Erika and Matthew, this patch has been applied, and
works cleanly.  I suggest we place this patch in the book, since many
system monitoring tools use gawk on the proc filesystem, and nothing
that uses gawk on the /proc filesystem is really going to work with gawk
3.1.2 due to this bug.

Thanks!

-J-


> On Fri, 13 Jun 2003 09:01:17 +0000 (UTC)
> pchllck at nexgo.de (Erika Pacholleck) wrote:
>
> > [13.06.2003] Jeremy Utley <-- :
> > > Been encountering some problems with Gawk on my server.  Turns out
> > > gawk 3.1.2 has a memory allocation problem when trying to parse
> > > files in/proc - From my reading of the info I found, it appears
that
> > > gawk as written chokes because these files appear to be
zero-length
> > > to gawk, but they actually contain data.  There's a patch to fix
> > > this problem on the gnu mailing lists at the link posted below -
but
> > > I myself haven't had any luck at getting it to apply smoothly.
> > >
> > >
http://mail.gnu.org/archive/html/bug-gnu-utils/2003-04/msg00032.html
> >
> > Attached reo.gawk-3.1.2.patch.gz, applies without problems
> >
> > I don't understand much of C coding style, so I might be wrong,
> > but to my eyes the code looks quite strange
> >
> > First I am not sure whether the # in front is correct, but as this
> > appears also earlier in the file and is not part of the patch, I
> > guess it might be ok.
>
> The # is a preprocessor directive.  i.e. before compilation then the
> preprocessor acts on the file to slightly alter the code.  The easiest
> example to see this working is the #include <someheaderfile.h>
> instructions.  When the preprocessor sees this it basically inserts
all
> of the contents of <someheaderfile.h> into the source file where the
> #include statement is.
>
> Hope this helps clarify things a bit.  I've also got a patch up at
>
http://osiris.sunderland.ac.uk/~ca9mbu/lfs-patches/gawk-3.1.2.zero-sized-files.patch
> - you beat me by a couple of seconds Erika!
>
> Cheers,
>
> Matt.
> -- 
> Unsubscribe: send email to listar at linuxfromscratch.org
> and put 'unsubscribe lfs-dev' in the subject header of the message
>
>
>
>

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message



More information about the lfs-dev mailing list