apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Striker" <stri...@apache.org>
Subject RE: Win32 segfault in allocator code
Date Tue, 19 Mar 2002 08:38:29 GMT
> From: Bill Stoddard [mailto:bill@wstoddard.com]
> Sent: 19 March 2002 05:43

>> I'm pretty sure I have identified the problem on Windows.  The blow up happens when
>> are trying to obtain a mutex that has been freed. This happens on the very last pool
to be
>> cleaned up (the "global_pool"). In apr_pool_destroy, we call the pool cleanups (one
>> which is for the mutex in the allocator) then call apr_allocator_free() which proceeds
>> to attempt to acquire the mutex that was just freed.

Oh, duh!  Why didn't I think of that?
Thanks for tracking this down Bill.

> This hack of a patch eliminates the seg fault.  I am not so familier with the pool code
> am not inclined to dig into it right now.  Perhaps the check to NULL out the mutex should
> be
> if (apr_allocator_get_owner(allocator) == pool) {
> ???

Yes, that is the correct spot.  I've committed a patch similar to yours.

> Bill


View raw message