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/sh with builtin 'test' has memory leaks Message-ID: <200207041016.g64AGhEF017182@grosbein.pp.ru>
next in thread | raw e-mail | index | archive | help
>Submitter-Id: current-users >Originator: Eugene Grosbein >Organization: Svyaz Service JSC >Confidential: no >Synopsis: /bin/sh with builtin 'test' has memory leaks >Severity: serious >Priority: low >Category: bin >Class: sw-bug >Release: FreeBSD 4.6-STABLE i386 >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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" 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>