15808407 SUNBT7189531 ksh93 crash+core dump with minimalist script
authorRohith Ramesh Bangalore India <rohith.ramesh@oracle.com>
Fri, 22 Feb 2013 02:29:02 -0800
changeset 1167 d9893d2bc7c8
parent 1166 36691b5d318b
child 1168 aeba575f9c99
15808407 SUNBT7189531 ksh93 crash+core dump with minimalist script
components/ksh93/Makefile
components/ksh93/patches/Bug15808407.patch
--- a/components/ksh93/Makefile	Fri Feb 22 01:07:26 2013 -0800
+++ b/components/ksh93/Makefile	Fri Feb 22 02:29:02 2013 -0800
@@ -77,7 +77,8 @@
 					 CR7168611.patch CR7178717.patch \
 					 CR7175995.patch \
 					 CR7186440_ksh93_disable_predictive_editing.patch \
-					 CR7128313.patch  Bug15794787,15819673.patch
+					 CR7128313.patch  Bug15794787,15819673.patch \
+					 Bug15808407.patch
 
 # Fixup HOSTTYPE to match uname output and bits
 HOSTTYPE32=sol11.$(shell uname -p)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/ksh93/patches/Bug15808407.patch	Fri Feb 22 02:29:02 2013 -0800
@@ -0,0 +1,15 @@
+--- a/src/cmd/ksh93/sh/init.c	2013-01-28 01:37:27.339300867 -0800
++++ b/src/cmd/ksh93/sh/init.c	2013-01-28 01:39:31.614342117 -0800
[email protected]@ -278,8 +278,11 @@
+ static void put_history(register Namval_t* np,const char *val,int flags,Namfun_t *fp)
+ {
+ 	Shell_t *shp = nv_shell(np);
+-	void 	*histopen = shp->gd->hist_ptr;
++	void 	*histopen = NULL;
+ 	char	*cp;
++	if( shp ) { 
++	    histopen = shp->gd->hist_ptr; 
++	}
+ 	if(val && histopen)
+ 	{
+ 		if(np==HISTFILE && (cp=nv_getval(np)) && strcmp(val,cp)==0)