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: weird IOKit crash in IOIteratorNext()



That's a pretty confusing looking for loop construct. You can get the same behavior out of this:

while( object = IOIteratorNext(iter) )

It freaks me out that you have IOIteratorNext() in that first arguent to the for loop. I don't know anything about how and when each of the 3 expressions in the for loop is executed behind the scenes in compiler-land, but what you're doing scares me :)

-ethan

On Dec 1, 2005, at 1:57 PM, Julian Mayer wrote:

hello all
i've received a very weird crash report that i'm unable to track down cause the code in question works everwhere else and similar code is also in apple's sample code. the crash is happening in:


0   com.apple.CoreFoundation  	0x901c0a14 CFRelease + 0x24
1   com.apple.framework.IOKit 	0x939c0e24 IOIteratorNext + 0x14

more specifically the line that is crashing is:

"for(object = IOIteratorNext(iter); object != 0; object = IOIteratorNext(iter)) // iterate through all "IOATABlockStorageDriver"s"

which seems very strange to me...i can see no obvious defect here...
does anybody have any ideas when/why this crash could occur?

you can obtain the complete code in question here: http:// homepage.mac.com/julianmayer/SMARTReporterSource.zip
and the complete crash log here: http://homepage.mac.com/ julianmayer/SMARTReporter.log
and the system profile of the machine where the crash occurs here: http://homepage.mac.com/julianmayer/Profile.zip


please help ;)
thanks, julian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden

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

This email sent to email@hidden
References: 
 >weird IOKit crash in IOIteratorNext() (From: Julian Mayer <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.