zsh-workers
 help / color / mirror / code / Atom feed
* Re: checking zsh
       [not found] <199609082028.WAA00435@hzoli.ppp.cs.elte.hu>
@ 1996-09-10 12:43 ` Daniel Brahneborg
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Brahneborg @ 1996-09-10 12:43 UTC (permalink / raw)
  To: zsh-workers; +Cc: Daniel Brahneborg

Hi all!

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.

- In addfd() in exec.c, the check "if (!fdtable[subsh_close])"
  seems to be executed even when subsh_close = -1.

The line allocated in inputline() might also be free'd and
reallocated, but that might just as well be an Insure bug.

Apart from these things, Zsh seems to be quite bug free.
(At least on this level.)

Let me know if the bugs were real, or if Insure just got
confused.  I'm not on a member of this mailing list, so keep 
a Cc: to me.  Thanks.

\Basic


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: checking zsh
@ 1996-09-11  0:40 Zoltan Hidvegi
  0 siblings, 0 replies; 2+ messages in thread
From: Zoltan Hidvegi @ 1996-09-11  0:40 UTC (permalink / raw)
  To: basic; +Cc: Zsh hacking and development

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-09-11  4:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <199609082028.WAA00435@hzoli.ppp.cs.elte.hu>
1996-09-10 12:43 ` checking zsh Daniel Brahneborg
1996-09-11  0:40 Zoltan Hidvegi

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).