From owner-freebsd-bugs Wed Jul 29 02:02:52 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA16253 for freebsd-bugs-outgoing; Wed, 29 Jul 1998 02:02:52 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from oslo.geco-prakla.slb.com (geos01.oslo.geco-prakla.slb.com [134.32.44.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA16242 for ; Wed, 29 Jul 1998 02:02:42 -0700 (PDT) (envelope-from smoergrd@oslo.sl.slb.com) Received: from sunw110.oslo.Geco-Prakla.slb.com (sunw110 [192.23.231.54]) by oslo.geco-prakla.slb.com (8.8.8/8.6.9) with SMTP id LAA03864 ; Wed, 29 Jul 1998 11:01:39 +0200 (MET DST) Received: by sunw110.oslo.Geco-Prakla.slb.com (SMI-8.6/SMI-SVR4) id LAA29453; Wed, 29 Jul 1998 11:01:38 +0200 To: Jerry Hicks Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: bin/7393: du throws SIGSEGV whenever '-c' option is used (at du.c:226) References: <199807290320.UAA25039@freefall.freebsd.org> Organization: Schlumberger Geco-Prakla X-Disclaimer: I speak only for myself. From: smoergrd@oslo.geco-prakla.slb.com (Dag-Erling Coidan Smørgrav) Date: 29 Jul 1998 11:01:37 +0200 In-Reply-To: Jerry Hicks's message of Tue, 28 Jul 1998 20:20:02 -0700 (PDT) Message-ID: Lines: 27 X-Mailer: Gnus v5.3/Emacs 19.34 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Jerry Hicks writes: > Indeed, I confirmed with Dag-Colin that /etc/malloc.conf -> AJ on the --------- Uh, no. :) Erling, as in "Little Earl". > savedp is assigned a value only if the loop started at du.c:186 and then > only at the following line, where it is assigned the value of 'p' which > comes from the 'fts_read()' function call. I checked that in your core dump; savedp contains a valid address, but the data at that addrress is uninitialized. The SIGSEGV occurs when the -c flag is set and du tries to dereference savedp->fts_parent which is garbage (0xd0d0d0d0 if you have malloc.conf set to J) > Ordinarily I would expect a compiler diagnostic to complain about the > use of a possibly uninitialized variable ( fts_read() could return NULL > the first time through? ) Possibly, yes. > Off to study fts_read() & Co. AOL. DES -- Dag-Erling Smørgrav - smoergrd@oslo.geco-prakla.slb.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message