Re: weird IOKit crash in IOIteratorNext()
Re: weird IOKit crash in IOIteratorNext()
- Subject: Re: weird IOKit crash in IOIteratorNext()
- From: Ethan Bold <email@hidden>
- Date: Thu, 1 Dec 2005 14:31:23 -0800
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:
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:
This email sent to email@hidden