Re: SEGV handler
Re: SEGV handler
- Subject: Re: SEGV handler
- From: Paul Ripke <email@hidden>
- Date: Sun, 16 Feb 2003 12:05:55 +1100
On Sunday, Feb 16, 2003, at 07:22 Australia/Sydney, Brian Tabone wrote:
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.
I remember doing this an age back under Linux, NetBSD 0.9 and Solaris,
while
developing a reasonably sized application. Our handler merely attempted
a
graceful shutdown of active network connections and closed our listening
socket. After all that, it dumped core. The main reason for all this?
There
was an annoying delay before Solaris would clean up our listening
socket,
preventing the app from restarting.
Cheers,
--
Paul Ripke
Unix/OpenVMS/TSM/DBA
101 reasons why you can't find your Sysadmin:
68: It's 9AM. He/She is not working that late.
-- Koos van den Hout
_______________________________________________
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.
References: | |
| >SEGV handler (From: Brian Tabone <email@hidden>) |