From owner-freebsd-bugs Tue Nov 7 2:45:44 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from ringworld.oblivion.bg (pool153-tch-1.Sofia.0rbitel.net [212.95.170.153]) by hub.freebsd.org (Postfix) with SMTP id D2D0C37B4D7 for ; Tue, 7 Nov 2000 02:45:39 -0800 (PST) Received: (qmail 3041 invoked by uid 1000); 7 Nov 2000 10:45:33 -0000 Date: Tue, 7 Nov 2000 12:45:32 +0200 From: Peter Pentchev To: Bruce Evans Cc: Gerald Pfeifer , David Malone , will@FreeBSD.ORG, bugs@FreeBSD.ORG, gnats-submit@FreeBSD.ORG Subject: Re: bin/19978: /usr/bin/make segfaults w/o Makefile for root (over NFS) Message-ID: <20001107124532.E314@ringworld.oblivion.bg> Mail-Followup-To: Bruce Evans , Gerald Pfeifer , David Malone , will@FreeBSD.ORG, bugs@FreeBSD.ORG, gnats-submit@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from bde@zeta.org.au on Tue, Nov 07, 2000 at 09:29:39PM +1100 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Could the attached patch do something about it? It's against RELENG_4 (rev 1.10 of dir.c). G'luck, Peter -- When you are not looking at it, this sentence is in Spanish. On Tue, Nov 07, 2000 at 09:29:39PM +1100, Bruce Evans wrote: > On Sun, 5 Nov 2000, Gerald Pfeifer wrote: > > > On Sun, 5 Nov 2000, David Malone wrote: > > > I've reopened the PR. > > > > Thanks! > > > > > Can you either get a back trace of the core from make using gdb or > > > ktrace it, so we can see what it was doing when it died? > > > 15545 make CALL stat(0x805b887,0xbfbfeb64) > > 15545 make NAMI "." > > 15545 make RET stat 0 > > 15545 make CALL open(0x805b887,0x4,0x280f8190) > > 15545 make NAMI "." > > 15545 make RET open -1 errno 13 Permission denied > > 15545 make PSIG SIGSEGV SIG_DFL > > 15545 make NAMI "/tmp/make.core" > > This output made it easy to reproduce the bug in a simpler way: > > $ cd /tmp > $ mkdir z > $ cd z > $ chmod 0 /tmp/z > $ make > Segmentation fault diff -urN src/usr.bin/make/dir.c mysrc/usr.bin/make/dir.c --- src/usr.bin/make/dir.c Sat Sep 11 16:08:01 1999 +++ mysrc/usr.bin/make/dir.c Tue Nov 7 12:42:20 2000 @@ -225,6 +225,8 @@ */ Dir_AddDir (openDirectories, "."); dot = (Path *) Lst_DeQueue (openDirectories); + if (dot == (Path *) NIL) + err(1, "cannot open current directory"); /* * We always need to have dot around, so we increment its reference count To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message