apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brad Nicholes" <BNICHO...@novell.com>
Subject Re: Creating an allocator with no mutex...
Date Fri, 18 Jul 2003 21:48:01 GMT
Credit to Jean-Jacques for doing most of the leg work on this one.

Brad

Brad Nicholes
Senior Software Engineer
Novell, Inc., the leading provider of Net business solutions
http://www.novell.com 

>>> Cliff Woolley <jwoolley@virginia.edu> Friday, July 18, 2003 3:38:26
PM >>>
On Fri, 18 Jul 2003, Brad Nicholes wrote:

> more threads could overwrite parent->child simply because the wrong
> mutex was locked or no mutex was locked at all (in our case).  The
call
> to apr_allocator_mutex_get() should use "parent->allocator" not
> "allocator".  If you look at apr_pool_destroy() it is doing it
> correctly.  Otherwise this code is not thread safe.

Ouch!!  Good catch.  :)

Mime
View raw message