apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: apr/lib apr_pools.c
Date Sat, 06 Jan 2001 20:18:28 GMT
On Sat, Jan 06, 2001 at 03:18:48PM -0000, rbb@apache.org wrote:
> rbb         01/01/06 07:18:48
> 
>   Modified:    .        CHANGES
>                lib      apr_pools.c
>   Log:
>   Keep apr_terminate from seg faulting on terminate.  This is
>   happening on systems that do not NULL out locks when they are
>   destroyed.  To keep this from happening, we set the locks to
>   NULL after destroying them in apr_terminate, and we have to
>   check for NULL in free_blocks.
>...
>   @@ -702,6 +706,8 @@
>    #if APR_HAS_THREADS
>        apr_destroy_lock(alloc_mutex);
>        apr_destroy_lock(spawn_mutex);
>   +    alloc_mutex = NULL;
>   +    spawn_mutex = NULL;
>    #endif
>        apr_destroy_pool(globalp);
>    }

To be clear, it doesn't matter what platform it is: nobody can "NULL out
locks" in the above case. apr_destroy_lock() can't reach out and set
alloc_mutex to NULL unless the call pattern is &alloc_mutex.

IOW, this isn't platform dependent. It may simply be that other platforms
are being a bit more tolerant; that the lock is still sitting around in a
useful format in free'd memory.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message