apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject RE: APR Bug or misunderstanding ?
Date Sat, 06 Jan 2001 15:08:40 GMT

> > Hmmmm..... I have just looked at the code in more detail, we have already
> > an "if (alloc_mutex {" check both before locking and unlocking the
> > mutex.  This means that we shouldn't be seg faulting.  When did you grab
> > your copy of APR?  Do you have the if calls in your copy?
> 
> Part of the problem I think is that apr_destroy_lock does
> not null out the alloc_mutex pointer so that the if(alloc_mutex)
> test in apr_destroy_pool is true and we trap (at least on Windows).
> Passing in a apr_lock_t** intro apr_destroy_lock and nulling the pointer
> might fix the problem.

Actually, I think that is the whole problem.  We can't really pass a
pointer to the lock to lock_destroy, because that would make the cleanup a
bit uglier, and the function wouldn't look like the rest of the APR
functions.  However, we can very easily set the sock to NULL before
destroying the pglobal lock.  I'll commit that now.

Ryan


_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message