apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@xbc.nu>
Subject Re: Win32 segfault in allocator code
Date Tue, 19 Mar 2002 15:13:50 GMT
Sander Striker wrote:

>>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 we
>>>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 of
>>>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 and
>>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.
>

That patch doesn't solve the problem. apr_terminate still crashes in the 
pool cleanup.

-- 
Brane ─îibej   <brane@xbc.nu>   http://www.xbc.nu/brane/




Mime
View raw message