apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@rexursive.com>
Subject Re: svn commit: r677505 - /apr/apr-util/trunk/misc/apr_reslist.c
Date Fri, 18 Jul 2008 01:20:35 GMT
On Thu, 2008-07-17 at 13:59 +0200, Mladen Turk wrote:

> So the destructor *must not* call apr_pool_destroy(subpool)
> if the parent pool is inside apr_pool_destroy (tricky).

You're right. In fact, this is the situation regardless of how the
cleanup is registered (pre or not). The attached program crashes (double
free) with or without that change.

PS. I don't have any apps that actually do this, but some people may
think it's OK to do this kind of thing, which makes me worried.

PPS. The situation I was referring to in my previous e-mails cannot
actually happen. R always outlives S.


View raw message