zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: basic@abalon.se
Cc: zsh-workers@math.gatech.edu (Zsh hacking and development)
Subject: Re: checking zsh
Date: Wed, 11 Sep 1996 02:40:50 +0200 (MET DST)	[thread overview]
Message-ID: <199609110040.CAA02706@hzoli.ppp.cs.elte.hu> (raw)

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;
  }
  


             reply	other threads:[~1996-09-11  4:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-11  0:40 Zoltan Hidvegi [this message]
     [not found] <199609082028.WAA00435@hzoli.ppp.cs.elte.hu>
1996-09-10 12:43 ` Daniel Brahneborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199609110040.CAA02706@hzoli.ppp.cs.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=basic@abalon.se \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).