Subject: Re: bin/3929: /bin/sh core SIGSEGV
To: None <ronald@demon.net>
From: Hiroyuki Ito <hiroy@netcom.com>
List: netbsd-bugs
Date: 08/21/1997 07:27:57
Simple fix:
----------------------------------------------------
*** eval.c.orig	Wed Jul 16 18:21:01 1997
--- eval.c	Wed Aug 20 05:34:37 1997
***************
*** 618,624 ****
  	setstackmark(&smark);
  	arglist.lastp = &arglist.list;
  	varlist.lastp = &varlist.list;
- 	cmdenviron = NULL;
  	varflag = 1;
  	oexitstatus = exitstatus;
  	exitstatus = 0;
--- 618,623 ----
***************
*** 818,823 ****
--- 817,823 ----
  		out1 = &output;
  		out2 = &errout;
  		freestdout();
+ 		cmdenviron = NULL;
  		if (e != EXSHELLPROC) {
  			commandname = savecmdname;
  			if (flags & EV_EXIT) {
----------------------------------------------------

% /bin/sh
$ set -- x
$ prog=java
$ for a in $*; do done
Segmentation fault (core dumped)
% 
% ./sh
$ set -- x
$ prog=java
$ for a in $*; do done
$ 

Hiroyuki Ito