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

Re: svn commit: rev 2038 - trunk/subversion/libsvn_subr

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-05-30 22:50:22 CEST

striker@tigris.org writes:

> Author: striker
> Date: 2002-05-30 01:07 GMT
> New Revision: 2038
>
> Modified:
> trunk/subversion/libsvn_subr/svn_error.c
> Log:
> * subversion/libsvn_subr/svn_error.c
>
> (svn_pool_clear): If we clear the top level svn pool, make sure
> we recreate a mutex for our own allocator.
>
>
> Modified: trunk/subversion/libsvn_subr/svn_error.c
> ==============================================================================
> --- trunk/subversion/libsvn_subr/svn_error.c (original)
> +++ trunk/subversion/libsvn_subr/svn_error.c Wed May 29 20:07:03 2002
> @@ -506,6 +506,19 @@
>
> if (subpool_of_p_p)
> {
> +#if APR_HAS_THREADS
> + /* At this point, the mutex we set on our own allocator will have
> + been destroyed. Better create a new one.
> + */
> + apr_allocator_t *allocator;
> + apr_thread_mutex_t *mutex;
> +
> + allocator = apr_pool_allocator_get (pool);
> + apr_allocator_mutex_set (allocator, NULL);
> + (void) apr_thread_mutex_create (&mutex, APR_THREAD_MUTEX_DEFAULT, pool);

Why are you ignoring the error? Should this be

        apr_err = apr_thread_mutex_create (...);
        if (apr_err)
           abort_on_pool_failure (apr_err);

> + apr_allocator_mutex_set (allocator, mutex);
> +#endif /* APR_HAS_THREADS */
> +
> /* Here we have a problematic situation. We cleared the pool P,
> which invalidated all its userdata. The problem is that as
> far as we can tell, the error pool on this pool isn't a copy

-- 
Philip
---------------------------------------------------------------------
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:22 2002

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