procmail
[Top] [All Lists]

Out of memory errors - 5368720864 bytes???? (fwd)

2002-03-25 00:44:20
After we updated sanitizer to version 1.133, we started seeing quite a few
of these errors from procmail version 3.22:

Mar 22 12:49:04 mail1 procmail[31438]: Out of memory as I tried to
allocate 5368720864 bytes

After some debugging and testing, I found this was occuring during
execution of a variable capture recipe that was new in sanitizer v1.133.

After more debugging and testing, I tracked the problem down to
pipthrough() in pipes.c.  It was trying to realloc() passing the address
of Stdfilled instead of the contents of that variable.  The following
patch seems to fix the problem we saw.  I also see several other messages
on the procmail mailing list that appear to be the same thing, so this
should fix them as well.

--- pipes.c.orig        Mon Sep 10 22:58:44 2001
+++ pipes.c     Fri Mar 22 13:23:29 2002
@@ -194,7 +194,7 @@
      makeblock(&temp,Stdfilled);
      tmemmove(temp.p,Stdout,Stdfilled);
      readdyn(&temp,&Stdfilled,Stdfilled+backlen+1);
-     Stdout=realloc(Stdout,&Stdfilled+1);
+     Stdout=realloc(Stdout,Stdfilled+1);
      tmemmove(Stdout,temp.p,Stdfilled+1);
      freeblock(&temp);
      retStdout(Stdout,pwait&&pipw,!backblock);


--
Michael L. Hitch                        mhitch(_at_)montana(_dot_)edu
Operations Consulting,  Information Technology Center
Montana State University, Bozeman, MT     USA


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • Out of memory errors - 5368720864 bytes???? (fwd), Michael L. Hitch <=