This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/8411: Segmentation fault error in malloc
- From: Joe Buck <jbuck at synopsys dot com>
- To: gcc-gnats at gcc dot gnu dot org, bridean at ureach dot com, gcc-bugs at gcc dot gnu dot org
- Date: Thu, 31 Oct 2002 14:33:42 -0800
- Subject: Re: c/8411: Segmentation fault error in malloc
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8411
Have you checked this program with a memory-checking tool (electric fence,
valgrind, purify, etc) and verified that it doesn't have any memory
allocation
errors (e.g. double-frees, writing beyond the end of an allocated
object, etc.).
The most common cause of segmentation faults in malloc is this kind of
user error,
and the problems tend to show up differently depending on optimization.