hook SIGSEGV
Sam Dodrill
shadow.h511 at gmail.com
Tue May 13 11:43:32 EDT 2014
After you get a SIGSEGV, you are screwed. You can probably recover if you
do a lot of work, but overall it's not worth it. Also in a signal handler
you are not guaranteed malloc() will work, the kernel may not allow you to
allocate more memory. Also your signal handler for SIGSEGV will keep
getting called because the SIGSEGV keeps coming until the program exits.
Note that you are not recommended to use functions such as printf() in a
signal handler (see:
https://www.securecoding.cert.org/confluence/display/seccode/SIG30-C.+Call+only+asynchronous-safe+functions+within+signal+handlers).
It might be worth looking into things like libsigsegv:
http://libsigsegv.sourceforge.net/
I hope this can help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140513/5c44cbf0/attachment.html
More information about the Kernelnewbies
mailing list