From owner-freebsd-bugs Thu Jul 4 3:20:15 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2BFD937B401 for ; Thu, 4 Jul 2002 03:20:06 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8703843E31 for ; Thu, 4 Jul 2002 03:20:05 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g64AK5JU012662 for ; Thu, 4 Jul 2002 03:20:05 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g64AK5db012661; Thu, 4 Jul 2002 03:20:05 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F0C1837B400; Thu, 4 Jul 2002 03:18:06 -0700 (PDT) Received: from grosbein.pp.ru (www2.svzserv.kemerovo.su [213.184.65.86]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5F6743E3B; Thu, 4 Jul 2002 03:18:04 -0700 (PDT) (envelope-from eu@grosbein.pp.ru) Received: from grosbein.pp.ru (smmsp@localhost [127.0.0.1]) by grosbein.pp.ru (8.12.5/8.12.2) with ESMTP id g64AH8L5017186; Thu, 4 Jul 2002 18:17:08 +0800 (KRAST) (envelope-from eu@grosbein.pp.ru) Received: (from root@localhost) by grosbein.pp.ru (8.12.5/8.12.3/Submit) id g64AGhEF017182; Thu, 4 Jul 2002 18:16:43 +0800 (KRAST) Message-Id: <200207041016.g64AGhEF017182@grosbein.pp.ru> Date: Thu, 4 Jul 2002 18:16:43 +0800 (KRAST) From: Eugene Grosbein Reply-To: Eugene Grosbein To: FreeBSD-gnats-submit@FreeBSD.org Cc: stable@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/40177: /bin/sh with builtin 'test' has memory leaks Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 40177 >Category: bin >Synopsis: /bin/sh with builtin 'test' has memory leaks >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jul 04 03:20:04 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Eugene Grosbein >Release: FreeBSD 4.6-STABLE i386 >Organization: Svyaz Service JSC >Environment: System: All releases with test built in /bin/sh >Description: There seem to be memory leak in 'test' command that was not a problem when it was external command but it became a problem when 'test' was made builtin. >How-To-Repeat: 1. Make test.sh: #!/bin/sh while : do [ 1=1 ] done 2. run top in one session and 'nice ./test.sh' in another, see how quickly it leaks. >Fix: Unknown for me. There are workarounds, though: 1. alias test=/bin/test; alias [=/bin/[ This will force using standalone versions of test and attenuate the problem. 2. Rebuild /bin/sh without test as builtin. That's enough to delete last line from /usr/src/bin/sh/builtins.def >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message