Re: Catching SIGBUS in Mach exception handler
Re: Catching SIGBUS in Mach exception handler
- Subject: Re: Catching SIGBUS in Mach exception handler
- From: Timothy Wood <email@hidden>
- Date: Sat, 28 Oct 2006 16:29:17 -0700
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:
This email sent to email@hidden