[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Inexcusable BDB upgrade triple blunder

From: Branko Čibej <brane_at_xbc.nu>
Date: 2006-03-01 00:16:36 CET

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

This is an archived mail posted to the Subversion Dev mailing list.