Re: Debugging crash in _class_shouldFinalizeOnMainThread
Re: Debugging crash in _class_shouldFinalizeOnMainThread
- Subject: Re: Debugging crash in _class_shouldFinalizeOnMainThread
- From: Barry Wark <email@hidden>
- Date: Wed, 1 Sep 2010 16:12:28 -0400
On Wed, Sep 1, 2010 at 3:52 PM, Greg Parker <email@hidden> wrote:
> On Sep 1, 2010, at 11:15 AM, Barry Wark wrote:
>> I'm getting intermittent crashes in my test suite for a GC application
>> on OS X 10.6.4. The KERN_INVALID_ADDRESS at 0x0000000900000028 occurs
>> in
>>
>> 0 libobjc.A.dylib 0x00007fff82ac847b
>> _class_shouldFinalizeOnMainThread + 4
>>
>> within the Dispatch queue: Garbage Collection Work Queue thread.
>>
>> This application makes heavy use of third-party C++ libraries, so I
>> assume that the problem is in my memory management of C++ within a GC
>> app, but I'm not sure where to start the debugging process. Since GC
>> is running on a separate thread, the debugger doesn't stop at a
>> particularly useful place. Can anyone point me in a useful direction?
>> I'd be happy to provide more details if there's relevant information
>> I'm leaving out.
>
> _class_shouldFinalizeOnMainThread() is called by the garbage collector on objects that it has decided are garbage. In this case, the dying object's isa pointer is invalid, and _class_shouldFinalizeOnMainThread() crashes while trying to dereference it.
>
> It's likely that a memory smasher or use-after-free of some other object has clobbered this object's isa. Try running with guardmalloc and AUTO_USE_GUARDS=YES to see if those uncover a smasher somewhere.
Yes, I think that did it. As you expected, AUTO_USE_GUARDS turned up
an array bounds overrun. Thanks, Greg.
>
>
> --
> Greg Parker email@hidden Runtime Wrangler
>
>
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden