SEGV handler
SEGV handler
- Subject: SEGV handler
- From: Brian Tabone <email@hidden>
- Date: Sat, 15 Feb 2003 14:22:41 -0600
Brent,
One trick you could try is to install a SEGV signal handler. If I
remember correctly, you can actually trap this signal in your
application and handle it without core dumping. I'm not sure how risky
it would be, nor how efficient, but you may be able to use this method
to check for validity of pointers. Now, the question here is would this
work in kernel space, and that I am doubtful, but it should work for
you in user space. I've never tried this myself, so your milage may
vary.
-Brian Tabone
On Friday, February 14, 2003, at 04:11 PM, Brent Marykuca wrote:
Hello,
Given a pointer value, is there some relatively trivial way to
determine whether or not it points to a valid readable or writeable
address? i.e. is there a way to find out whether accessing the address
will cause a panic? I'm interested in how to do this from a KEXT, but
it also seems like it would be a useful ability to have in user-space
too.
Thanks,
Brent Marykuca
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.