From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.redhat.com (Postfix) with ESMTP id AC9A13F833 for ; Mon, 8 Jul 2002 16:04:26 -0400 (EDT) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id g68K4Ql24461 for axp-list@listman.redhat.com; Mon, 8 Jul 2002 16:04:26 -0400 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id g68K4Qa24457 for ; Mon, 8 Jul 2002 16:04:26 -0400 Received: from mailserver.iplink.net (IDENT:root@smtp.iplink.net [192.139.81.186]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id g68Js5902976 for ; Mon, 8 Jul 2002 15:54:05 -0400 Received: from mercutio.iplink.net ([192.139.81.54]:4877 "EHLO iplink.net") by ml.comspec.com with ESMTP id ; Mon, 8 Jul 2002 16:04:04 -0400 Message-ID: <3D29F03A.A4050A72@iplink.net> Date: Mon, 08 Jul 2002 16:04:10 -0400 From: alvin X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.19-6.2.7.iplink2 i686) X-Accept-Language: en MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: Calloc bug. References: <3D29BA0B.3CDD662@iplink.net> <87it3qfag4.fsf@student.uni-tuebingen.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: Falk Hueffner wrote: > > alvin 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 ||