From: alvin <alvin@iplink.net>
To: axp-list@redhat.com
Subject: Re: Calloc bug.
Date: Mon, 08 Jul 2002 16:04:10 -0400 [thread overview]
Message-ID: <3D29F03A.A4050A72@iplink.net> (raw)
In-Reply-To: 87it3qfag4.fsf@student.uni-tuebingen.de
Falk Hueffner wrote:
>
> alvin <alvin@iplink.net> writes:
>
> > I believe there to be a bug in calloc. I have a couple of programs one
> > of which is a small disk space check program from netsaint. I have not
> > been yet able to create a small program that will recreate the error but
> > I keep getting a segfault in the chunck_alloc code.
> >
> > I have run up dmalloc to see if there is a problem with the actuall use
> > of calloc and the problem then goes away. I have run dmalloc on another
> > offending program and the problem that I have there also seems to go
> > away.
> >
> > Does anybody else know about this and possibly have a fix or am I going
> > to be spending a few days whakcing my head against the malloc code.
>
> It is is unlikely that this is a bug in malloc; malloc is very mature
> code. More likely, it is a bug in your code that destroys malloc's
> internal structures, the classical example being array overruns. We
> cannot decide that though without a test case.
>
> If you have an i386 with Linux, you might want to try valgrind, a
> memory debugger which can catch such errors.
Now I am willing to believe that there is a bug here but using gdb and
dmalloc either strcpy is failing or strstr is modifying the string it is
looking at.
--
Alvin Starr || voice: (416)785-4051
Interlink Connectivity || fax: (416)785-3668
alvin@iplink.net ||
next prev parent reply other threads:[~2002-07-08 20:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-08 16:12 Calloc bug alvin
2002-07-08 16:31 ` Falk Hueffner
2002-07-08 20:04 ` alvin [this message]
2002-07-08 20:41 ` alvin
2002-07-08 21:06 ` Uncle George
2002-07-09 1:27 ` Calloc bug(not) Alvin Starr
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox