httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: [PATCH] ap_proxy_http_process_response double lifetime transform
Date Fri, 13 Dec 2013 13:05:40 GMT
On Fri, Dec 13, 2013 at 10:33 AM, Ruediger Pluem <rpluem@apache.org> wrote:

>
>
> Yann Ylavic wrote:
> > Hi devs,
> >
> > This was pointed out by Joe Orton's comment at
> https://issues.apache.org/bugzilla/show_bug.cgi?id=50335#c40.
> >
> > Here is a proposal (patch against ap_proxy_http_process_response) to
> address the double lifetime transformation of the
> > buckets from the backend when its connection is released early (on EOS,
> before the last buckets are forwarded to the
> > client).
>
> In this case the buckets that would be sent to the output filters would
> have been allocated from the wrong allocator
> which can lead to crashes. IMHO the code is fine as is. It might be
> possible to optimize here, but the patch below just
> sents down buckets with the wrong lifetime down the chain.
>

Yes you are right, the patch only cares about the pool...

I guess the optimisation should be in proxy_buckets_lifetime_transform(),
but an efficient APR way of copying/setting aside buckets (including the
bucket_alloc, ie. refcounting), depending on the bucket type, would be
welcome...


>
> Regards
>
> RĂ¼diger
>
>

Mime
View raw message