Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libgmalloc on MacBook Pro




On 6 apr 2007, at 01:22, Michael Anderson wrote:

It would seem
to me that the guard allocator should catch any errors that would cause
GMmalloc to fail, and should *not* die in GMmalloc. Is this observation
correct?

No. If you write to a random memory location which is not protected by GMalloc, and which happens to contain internal GMalloc state, then you can corrupt GMalloc's internal state in a way that will cause it to crash.


Or is a fault in GMmalloc an indication of a memory bug in my
application?

Yes.

If it is a problem in my application dieing in GMmalloc doesn't
help me debug it.

What you can try is figure out from which address GMalloc loads the invalid pointer value whose dereferencing causes the crash. Chances are that it'll be the same address each time you run your application (unless GMallloc includes address randomization logic). If so, you can try putting a watchpoint on that address to catch all writes to that address, in order to see where in your program you modify the value at that address.



Jonas _______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >libgmalloc on MacBook Pro (From: "Michael Anderson" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.