components/ksh93/patches/17851169.patch
author Lijo George<lijo.x.george@oracle.com>
Thu, 26 May 2016 22:52:21 -0700
branchs11u3-sru
changeset 6073 99c2bf34d78a
parent 2992 d9071f35b6d4
permissions -rw-r--r--
PSARC/2014/162 ksh93 update to 2012-08-01 16169978 ksh93 memory corruption with redirection 16507675 external command in double-nested here-document hangs ksh93 17533968 ksh93 uprev to latest community version 18119738 ksh93 crashes in sfio area 18302723 ksh93 segv in sh_setmatch 18426052 SPARC /usr/bin/ksh is not an XPG6 executable 18920300 remove pkglint Warnings in ksh93 build
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6073
99c2bf34d78a PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents: 2992
diff changeset
     1
#	This has been submitted to the community but has not been accepted yet.
99c2bf34d78a PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents: 2992
diff changeset
     2
#	The details can be found at the following location.
99c2bf34d78a PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents: 2992
diff changeset
     3
#	http://lists.research.att.com/pipermail/ast-developers/2014q1/003809.html
99c2bf34d78a PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents: 2992
diff changeset
     4
--- INIT.2012-08-01.old/src/cmd/ksh93/sh/subshell.c	2015-02-24 13:25:19.363479570 -0800
99c2bf34d78a PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents: 2992
diff changeset
     5
+++ INIT.2012-08-01/src/cmd/ksh93/sh/subshell.c	2015-03-05 13:02:10.389323525 -0800
99c2bf34d78a PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents: 2992
diff changeset
     6
@@ -242,15 +244,22 @@ Namval_t *sh_assignok(register Namval_t
2992
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     7
 {
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     8
 	register Namval_t	*mp;
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
     9
 	register struct Link	*lp;
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    10
-	register struct subshell *sp = (struct subshell*)subshell_data;
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    11
-	Shell_t			*shp = sp->shp;
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    12
-	Dt_t			*dp= shp->var_tree;
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    13
+	register struct subshell *sp;
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    14
+	Shell_t			*shp;
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    15
+	Dt_t			*dp;
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    16
 	Namval_t		*mpnext;
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    17
 	Namarr_t		*ap;
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    18
 	int			save;
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    19
+
6073
99c2bf34d78a PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents: 2992
diff changeset
    20
+	sp = (struct subshell*)subshell_data;
2992
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    21
+
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    22
 	/* don't bother with this */
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    23
-	if(!sp->shpwd || np==SH_LEVELNOD || np==L_ARGNOD || np==SH_SUBSCRNOD || np==SH_NAMENOD)
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    24
+	if(!sp || !sp->shpwd || np==SH_LEVELNOD || np==L_ARGNOD || np==SH_SUBSCRNOD || np==SH_NAMENOD)
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    25
 		return(np);
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    26
+
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    27
+	shp = sp->shp;
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    28
+	dp = shp->var_tree;
d9071f35b6d4 17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff changeset
    29
+
6073
99c2bf34d78a PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents: 2992
diff changeset
    30
 	/* don't bother to save if in newer scope */
99c2bf34d78a PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents: 2992
diff changeset
    31
 	if(sp->var!=shp->var_tree && sp->var!=shp->var_base && shp->last_root==shp->var_tree)
99c2bf34d78a PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents: 2992
diff changeset
    32
 		return(np);