Memory allocation problem with Gawk 3.1.2

Erika Pacholleck pchllck at
Fri Jun 13 01:58:27 PDT 2003

[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.
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 with regard to the
#if 0
lines. The shortened structure in this file looks like this:

  for (;;) {
    if (/* comments */
      code) {
        if {
#if 0
        } else {

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.
Second I am not sure it is correct to place an if right in front
of closing } and let it span over the else case, if that was the
And my gawk tarball *is* the official one from and not from
some other place.

In all, from what I see and guess here, I myself would not trust that
patch doing the right thing, but maybe all is correct and your tests
Erika ...---...: pacholleck at nexgo dot de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reo.gawk-3.1.2.patch.gz
Type: application/x-gunzip
Size: 1428 bytes
Desc: reo.gawk-3.1.2.patch.gz
URL: <>

More information about the lfs-dev mailing list