This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Segmentation fault Causes
- From: bjorn rohde jensen <bjensen at fastmail dot fm>
- To: Daniel Bolgheroni <dab__ at uol dot com dot br>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 22 Apr 2003 09:47:46 +0200
- Subject: Re: Segmentation fault Causes
- References: <20030224045442.GA25932@uol.com.br>
- Reply-to: bjensen at fastmail dot fm
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