On Mon, Jul 2, 2012 at 5:53 PM, Flost Li <havefan2012@gmail.com> wrote:
Hi all,
I download the SampleFilterScheme example code from https://developer.apple.com/library/mac/#samplecode/SampleFilterScheme/Intro... But I have some issue on making study on it.
I modify the code downloaded, and add the "probe" method. This probe function will scan a scsi disk and check whether it contains certain string on certain offset. If the probe function got the string, the function will return a score of 9999.
I build the project, insert this kext, and than i connect my device. from the log, i notice that the disk was recognize by the kext, and the kext started. but soon after the driver start, the system got panic. when i restart the machine, and use gdb/kextutils to decode the panic stack sounds like below: (as the first several level are the same, i only print the first 7 level of the stack.)
I can only guess, as you haven't provided any code, but: You need to call the read() method *on the provider IOMedia object* (your underlying disk/partition) in your read() method. It looks like you're calling this->read() or IOStorage::read() instead.
I'm wandering why the iokit got recursive status? does the panic called by the over stack, when the recursive for much time?
Notice the "Double fault" - this almost always means you've hit a stack overflow. Kernel stacks are only a little under 16KiB on OSX, so they're very easy to blow, not that a bigger stack would have helped in this case, as the recursion would probably have carried on forever. Hope that helps, phil _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com