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

RE: Pools problems, fixed.

From: Sander Striker <striker_at_apache.org>
Date: 2002-05-30 22:07:32 CEST

> From: Branko Cibej [mailto:brane@xbc.nu]
> Sent: 30 May 2002 21:51

> Sander Striker wrote:
>
> >Hi,
> >
> >A bunch of pools commits to APR later...
> >
> >Seriously, I think I have it fixed now. For both with APR_POOL_DEBUG
> >and without. Please update your APR when compiling the HEAD of
> >Subversion.
> >
> >Thanks,
> >
> >Sander
> >
> >
> Well, the Windows build compiles without APR changes now, but the tests
> still crash, albeit in a different place now (in apr_allocator_free).
> This happens in both the release and debug builds, so it can't be
> related to the pools debugging code.
>
> Unfortunately I don't have time to track this down. If somebody cares to
> try, I'll cheer you on (a good place to start would be stringtest 13).
> Otherwise I'll have a go on Monday.

Ah, I know what it is.
We need to register a simple cleanup:

static apr_status_t svn_allocator_reset_mutex(void *allocator)
{
   apr_allocator_mutex_set(allocator, NULL);
   return APR_SUCCESS;
}

This needs to be registered in svn_pool_create() in the block
where there is no parent, and in svn_pool_clear() in the _p_p
block.

That will fix things (destroy currently kills the mutex, but apr_allocator_free
still uses it after that... NULL'ing the mutex will help).

I'll see if I can squeeze that in tomorrow. Others are ofcourse
free to incorporate it.

Sander

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jun 1 14:16:57 2002

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.