Greg Hudson wrote:
> On Tue, 2006-02-28 at 06:47 +0100, Branko Čibej wrote:
>
>> The consequence is that, when we hit apr_terminate, the cache's pool can
>> be destroyed before the pool that contains the svn_fs_t that refers to
>> the cache; that's because APR destroys its (global) pools in LIFO order.
>> Unfortunately that means that during destruction of the svn_fs_t, we try
>> to access memory that's already been freed.
>>
>
> Here's my brilliant idea: set bdb_cache to NULL in a pool cleanup for
> bdb_cache_pool. In the svn_fs_destroy handler, check if bdb_cache is
> NULL and don't touch the underlying environment handle if so.
>
Yes, I was thinking along those lines. Except that it means we can't
allocate the environment handles from pools, because then their lifetime
will by definition be shorter than the cache's.
So it looks like a mixture of heap and pool allocations will be the way
to go after all ...
-- Brane
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 1 00:17:16 2006