On 8/25/06, Garrett Rooney <rooneg@electricjellyfish.net> wrote:
> On 8/25/06, Vlad Georgescu <vgeorgescu@gmail.com> wrote:
> > On 8/25/06, Garrett Rooney <rooneg@electricjellyfish.net> wrote:
> > > I'm thinking that we may be able to get away with sticking if
> > > (sasl_done) return; in various places, since this will only ever
> > > happen at global shutdown time, at which point we've already assumed
> > > that we're in single threaded mode, so locking isn't needed...
> >
> > I'll add those checks. Should I submit a separate patch, or
> > incorporate them in the other one?
>
> One patch that does both should be fine.
>
Ok, here goes..
[[[
Handle the case when sasl_pool is destroyed before the connection pool,
by making sure that:
a) nothing allocated in sasl_pool is accessed after that pool is destroyed.
b) sasl_done() is always called _after_ the last call to sasl_dispose().
* subversion/include/private/svn_atomic.h
(svn_atomic_inc, svn_atomic_dec): New macro definitions.
* subversion/libsvn_ra_svn/sasl_auth.c
(sasl_ctx_count): New static variable.
(svn_ra_svn__sasl_common_init): Initialize sasl_ctx_count.
(sasl_done_cb, sasl_dispose_cb): Decrement sasl_ctx_count. If it
is 0, call sasl_done().
(new_sasl_ctx): Increment sasl_ctx_count..
(sasl_mutex_alloc_cb, sasl_mutex_lock_cb,
sasl_mutex_unlock_cb, sasl_mutex_free_cb): Check the value of sasl_status
before doing anything.
]]]
--
Vlad
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Aug 25 19:33:45 2006