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: Catching SIGBUS in Mach exception handler




On Oct 24, 2006, at 10:28 AM, leenoori wrote:


"A return value of KERN_SUCCESS indicates that the thread is to continue from the point of exception."


I interpret that to mean on the next instruction, the one after the one that provoked the exception, but that doesn't seem to be happening here...

The instruction that is causing the exception hasn't been executed; it raised an exception instead. So, you need to have your exception handler to "fix" the problem either by causing the memory mapping/protections to be changed, stepping past the instruction, or whatever.


For example, you might want to implement a OODB by mapping in pages in a read-only fashion from the server and then marking them r/ w on the first write exception. In this case, you'd want the original instruction to actually get executed (a store of some sort) rather than skipped.

-tim

_______________________________________________
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: 
 >Catching SIGBUS in Mach exception handler (From: leenoori <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.