httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: [Patch] Async write completion for the full connection filter stack
Date Thu, 11 Sep 2014 04:39:55 GMT
On 11 Sep 2014, at 1:51 AM, Yann Ylavic <ylavic.dev@gmail.com> wrote:

> +{
> +    if (bb == NULL) {
> 
> Is this test really needed? This does not seem to be possible with you
> patch, and now this is part of the API, a crash if often better in
> this case (like for any other ap_filter_*() function which is given a
> NULL bb, or the ap[r] ones in general which tend -sanely- to crash
> where the code is faulty).

The test doesn’t seem to be needed no, that’s legacy.

> +    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.


Mime
View raw message