[LCP]debugging a SIGSEGV

Karthik Vishwanath karthikv at Alum.Dartmouth.ORG
Mon Feb 7 03:34:02 UTC 2005


My program quits _after_ processing the last lines of main() with a
SIGSEGV (the last lines of main() are a printf() statements). I compiled
the program using the -ggdb flags and used ddd to execute the program to
get any more info. on where the code dies and heres what ddd tells me:
"Program received signal SIGSEGV, Segmentation fault. 0x4012be5b in
__register_atfork () from /lib/libc.so.6 (gdb) "

Can anyone tell me what is going on, and why this could be happening (I
have checked writes to malloc'd *s very carefully and I don't think its
because of accessing an uninitialized memory location etc.)?  Any/all
pointers (no pun intended) toward throwing some light on how to get rid of
the segmentation fault will be very appreciated.

Thanks,

-K






More information about the linuxCprogramming mailing list