From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dns.primenet.com.au (dns.primenet.com.au [203.24.36.40]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id OAA00216 for ; Wed, 11 Sep 1996 14:18:21 +1000 (EST) Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by dns.primenet.com.au (8.7.5/8.7.3) with ESMTP id LAA00898 for ; Wed, 11 Sep 1996 11:14:44 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id UAA17298; Tue, 10 Sep 1996 20:51:45 -0400 (EDT) Resent-Date: Tue, 10 Sep 1996 20:51:45 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199609110040.CAA02706@hzoli.ppp.cs.elte.hu> Subject: Re: checking zsh To: basic@abalon.se Date: Wed, 11 Sep 1996 02:40:50 +0200 (MET DST) Cc: zsh-workers@math.gatech.edu (Zsh hacking and development) X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"EmlMD3.0.AE4.WqWDo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2126 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Daniel Brahneborg wrote: > I've done some checking on zsh-3.0.1 with Insure++. > Unfortunately here are lots of bugs in Insure, so the output > isn't entirely reliable. It has found two small things though: > > - In createparamtable() in params.c, it looks as if the memory > allocated to "Param pm;" is lost. I do not see any problem there. > - In addfd() in exec.c, the check "if (!fdtable[subsh_close])" > seems to be executed even when subsh_close = -1. Yes, it is a real bug but in real life it is completely unnoticeable. Global variables are stored in one section and fdtable[-1] is a valid address on most systems. So this is a bug which can never be detected without a memory debugger. Patch is included below anyway. > The line allocated in inputline() might also be free'd and > reallocated, but that might just as well be an Insure bug. I do not see the problem there either. > Apart from these things, Zsh seems to be quite bug free. > (At least on this level.) That's good. An other useful test would be to try a complex Bourne-shell script. Do not forget to rename or link zsh to sh before the test. For example the configure script which comes with zsh can be used for the test. Thanks, Zoltan *** Src/exec.c 1996/08/31 20:19:08 2.87 --- Src/exec.c 1996/09/11 00:05:57 *************** *** 1044,1050 **** } else /* add another fd to an already split stream */ mfds[fd1]->fds[mfds[fd1]->ct++] = movefd(fd2); } ! if (!fdtable[subsh_close]) subsh_close = -1; } --- 1044,1050 ---- } else /* add another fd to an already split stream */ mfds[fd1]->fds[mfds[fd1]->ct++] = movefd(fd2); } ! if (subsh_close >= 0 && !fdtable[subsh_close]) subsh_close = -1; }