Segmentation fault Causes
bjorn rohde jensen
bjensen@fastmail.fm
Tue Apr 22 07:47:00 GMT 2003
Hi there,
Segmentation faults are signals delivered from the operating
system to a process to inform it, that the process has attempted
to access memory outside its address space. Common causes are
forgetting to initialise a pointer before use or using something,
which is not a pointer, as a pointer.
You might want to compile with debug info and run the program
under a debug'er. It should provide you with the exact line,
where the segfault is generated. If you are fairly lucky, the
reason will be also be quite apparent.
Yours sincerely,
Bjorn
More information about the Gcc-help
mailing list