httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Plüm, Rüdiger, Vodafone Group <ruediger.pl...@vodafone.com>
Subject RE: [Patch] Async write completion for the full connection filter stack
Date Thu, 11 Sep 2014 07:04:16 GMT


From: Graham Leggett [mailto:minfrin@sharp.fm]
Sent: Donnerstag, 11. September 2014 06:40
To: dev@httpd.apache.org
Subject: Re: [Patch] Async write completion for the full connection filter stack

On 11 Sep 2014, at 1:51 AM, Yann Ylavic <ylavic.dev@gmail.com<mailto:ylavic.dev@gmail.com>>
wrote:


> +    else if (*deferred_write_pool) {
> +        /*
> +         * There are no more requests in the pipeline. We can just clear the
> +         * pool.
> +         */
>
> Shouldn't *buffered_bb be set to NULL here when *deferred_write_pool
> == (*buffered_bb)->p, or more generally
> apr_pool_is_ancestor(*deferred_write_pool, (*buffered_bb)->p). We
> can't leave a dangling pointer in this case.
>
> +        apr_pool_clear(*deferred_write_pool);

Hmmm... this came from the original code.
We can't set buffered_bb to NULL unless we are sure we created buffered_bb, and this isn't
necessarily the case. In the core filter, buffered_bb is created when the connection is created.

How about doing a

apr_brigade_cleanup(buffered_bb)

before the  apr_pool_clear?

Regards

Rüdiger



Mime
View raw message