Re: hook SIGSEGV

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux