httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Max Kellermann <...@duempel.org>
Subject Re: Parsers test eats all the memory
Date Wed, 12 Jan 2005 23:13:38 GMT
On 2005/01/13 00:08, Joe Schaefer <joe+gmane@sunstarsys.com> wrote:
> How much RAM you got on there?  There's a loop-in-a-loop that's run
> a few hundred thousand times; it's in t/parsers.c:parse_multipart.
> I don't know where that memory is going (I do ack the problem),

That's a bug which I already fixed in my patches..

In the innermost loop of parse_multipart(), it creates an immortal
bucket which is never freed. The bucket is added to "bb", but "bb" is
then assigned a new value:

            bb = apreq_value_to_param(apreq_strtoval(val))->bb;

.. and the following has no effect on the original (splitted up)
immortal bucket, it only cleans up the value bucket brigade:

            apr_brigade_cleanup(bb);

I changed that to two apr_bucket_brigade_t* variables in my patch.

Max


Mime
View raw message