A wealth of information can be gleaned from the kernel when a process dies via the SIGSEGV: memory bugs or defects, a common case, as we have discussed in the Chapters 4, Dynamic Memory Allocation, Chapter 5, Linux Memory Issues, and Chapter 6, Debugging Tools for Memory Issues. (This section also applies to the fatal signals SIGBUS, SIGILL, and SIGFPE. Incidentally, SIGFPE occurs not just upon a divide-by-zero error but in any kind of arithmetic-related exception).
The man page on sigaction(2) reveals the following:
...The following values can be placed in si_code for a SIGSEGV signal:SEGV_MAPERR Address not mapped to object.SEGV_ACCERR Invalid permissions for mapped object.SEGV_BNDERR ...