On Jun 17, 2011, at 3:48 PM, Laurent Daudelin wrote:

> On Jun 17, 2011, at 15:22, Greg Parker wrote:
> 
>> On Jun 17, 2011, at 2:40 PM, Laurent Daudelin wrote:
>>> One of my user sent me a crash log with an excerpt here:
>>> 
>>> ...
>>> Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
>>> Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000027
>>> ...
>>> Thread 4 Crashed:  Dispatch queue: com.apple.root.default-priority
>>> 0   libobjc.A.dylib                 0x00007fff85ea115c objc_msgSend_vtable2 
>>> + 12
>>> 1   com.apple.Foundation            0x00007fff827f79a5 -[NSCFString 
>>> isEqualToString:] + 63
>>> ...
>>> 
>>> It's a part of my code that compares NSStrings. Of course, nobody besides 
>>> him are able to reproduce this.
>>> 
>>> My question: what could cause a crash in function 'objc_msgSend_vtable2'?
>> 
>> Short answer: for any of the same reasons that cause a crash in 
>> objc_msgSend(). 
>> 
>> The vtable versions of objc_msgSend() are specialized optimizations for a 
>> few of the most frequently-called methods. objc_msgSend_vtable2 is currently 
>> optimizing the -class method. Presumably one of the two string objects was 
>> invalid and -isEqualToString: was trying to check which class the bad object 
>> belonged to.
> 
> Thanks for the speedy reply, Greg. What do you mean exactly by "invalid"? Bad 
> pointers? Pointers on instances of different classes? Or both?


Pointer to anything that is not a valid object. Merely being an instance of the 
wrong class would not cause that crash.


-- 
Greg Parker     gpar...@apple.com     Runtime Wrangler


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to