From owner-freebsd-hackers Mon Nov 5 11:55:23 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from isbalham.ist.co.uk (isbalham.ist.co.uk [192.31.26.1]) by hub.freebsd.org (Postfix) with ESMTP id 64FAB37B41A for ; Mon, 5 Nov 2001 11:55:16 -0800 (PST) Received: (from uucp@localhost) by isbalham.ist.co.uk (8.11.1/8.11.1) with UUCP id fA5JtCW05040; Mon, 5 Nov 2001 19:55:12 GMT (envelope-from rb@gid.co.uk) Received: from [194.32.164.2] (eccles [194.32.164.2]) by seagoon.gid.co.uk (8.9.3/8.9.3) with ESMTP id TAA21500; Mon, 5 Nov 2001 19:47:45 GMT (envelope-from rb@gid.co.uk) X-Sender: rb@194.32.164.1 Message-Id: In-Reply-To: <20011105130328.G89342@elvis.mu.org> References: <4.3.2.7.2.20011105121057.00bace90@gid.co.uk>; from rb@gid.co.uk on Mon, Nov 05, 2001 at 12:33:13PM +0000 <4.3.2.7.2.20011105121057.00bace90@gid.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Mon, 5 Nov 2001 19:47:45 +0000 To: Alfred Perlstein From: Bob Bishop Subject: Re: Committer please Cc: hackers@freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, At 13:03 -0600 5/11/01, Alfred Perlstein wrote: >* Bob Bishop [011105 06:35] wrote: >> Hi, >> >> Would some kind committer please have a look at bin/31533: /bin/sh memory >> leak. There is a patch there which I believe is OK. Having a memory leak >> loose in the shell seems like a Bad Idea to me. TIA > >Understandable, things like this could be applied more quickly if >someone would take the time to explain what the delta does other >than fix the problem. Meaning, what is VTEXTFIXED, and what does >removing it change? According to src/bin/sh/var.h: #define VTEXTFIXED 0x08 /* text is staticly allocated */ (in the text member of struct var, that is). prevdir and curdir in the region of the patch are dynamically allocated, but with VFIXEDTEXT their storage would not be freed when superseded (see var.c:319). Hence the leak. Apologies for the lazy submission. I posted the PR. Maxim suggested the patch. I tried it. It worked. Mea culpa. Now my consciemnce is troubling me, I've just started a make world with the patch in... -- Bob Bishop (0118) 977 4017 international code +44 118 rb@gid.co.uk fax (0118) 989 4254 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message