
ruediger.pluem at vodafone
May 8, 2008, 9:52 AM
Post #2 of 2
(35 views)
Permalink
|
|
Re: abort inside ap_internal_fast_redirect()
[In reply to]
|
|
> -----Ursprüngliche Nachricht----- > Von: Graham Leggett > Gesendet: Donnerstag, 8. Mai 2008 15:29 > An: dev[at]httpd.apache.org > Betreff: abort inside ap_internal_fast_redirect() > > Hi all, > > While debugging something else entirely I have tripped over > an abort() > triggered from inside mod_dir when POOL_DEBUG is enabled. > > It seems within ap_internal_fast_redirect(), an attempt is > made to do this: > > r->notes = apr_table_overlay(r->pool, rr->notes, r->notes); > > The abort occurs because "apr_table_overlay: overlay's pool is not an > ancestor of p". > > The subrequest rr is created inside make_sub_request() like this: > > apr_pool_create(&rrp, r->pool); > apr_pool_tag(rrp, "subrequest"); > rnew = apr_pcalloc(rrp, sizeof(request_rec)); > rnew->pool = rrp; > > I am confused - rr->pool was created as an ancestor of > r->pool, so why > should it abort? IMHO the code in apr_table_overlay is wrong: #if APR_POOL_DEBUG /* we don't copy keys and values, so it's necessary that * overlay->a.pool and base->a.pool have a life span at least * as long as p */ if (!apr_pool_is_ancestor(overlay->a.pool, p)) { fprintf(stderr, "apr_table_overlay: overlay's pool is not an ancestor of p\n"); abort(); } if (!apr_pool_is_ancestor(base->a.pool, p)) { fprintf(stderr, "apr_table_overlay: base's pool is not an ancestor of p\n"); abort(); } #endif I guess it should be apr_pool_is_ancestor(p, overlay->a.pool) and apr_pool_is_ancestor(p, base->a.pool) instead. Regards Rüdiger
|