Date: Thu, 4 Jul 2002 18:16:43 +0800 (KRAST) From: Eugene Grosbein <eu@grosbein.pp.ru> To: FreeBSD-gnats-submit@FreeBSD.org Cc: stable@FreeBSD.org Subject: bin/40177: /bin/sh with builtin 'test' has memory leaks Message-ID: <200207041016.g64AGhEF017182@grosbein.pp.ru>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207041016.g64AGhEF017182>