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 4400A3F4B5 for ; Mon, 8 Jul 2002 16:41:29 -0400 (EDT) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id g68KfS302386 for axp-list@listman.redhat.com; Mon, 8 Jul 2002 16:41:28 -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 g68KfSa02379 for ; Mon, 8 Jul 2002 16:41:28 -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 g68KV7909565 for ; Mon, 8 Jul 2002 16:31:07 -0400 Received: from mercutio.iplink.net ([192.139.81.54]:6413 "EHLO iplink.net") by ml.comspec.com with ESMTP id ; Mon, 8 Jul 2002 16:41:19 -0400 Message-ID: <3D29F8F5.9DE1A3EC@iplink.net> Date: Mon, 08 Jul 2002 16:41:25 -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. Damn. The one problem that I could track down turned out to be a programming bug after all. I assume that my second problem that I cannot easly debug will also turn out to be a programming bug. Is there any "sloppy" malloc out there that will leave room at the end of a block for those who have the +/-1 problem with programming loops? -- Alvin Starr || voice: (416)785-4051 Interlink Connectivity || fax: (416)785-3668 alvin@iplink.net ||