author | Mike Sullivan <Mike.Sullivan@Oracle.COM> |
Tue, 17 Jan 2017 10:38:18 -0800 | |
changeset 7581 | 6eab3997b074 |
parent 5129 | 5431772f7235 |
permissions | -rw-r--r-- |
5129
5431772f7235
PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents:
4305
diff
changeset
|
1 |
# This has been submitted to the community but has not been accepted yet. |
5431772f7235
PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents:
4305
diff
changeset
|
2 |
# The details can be found at the following location. |
5431772f7235
PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents:
4305
diff
changeset
|
3 |
# http://lists.research.att.com/pipermail/ast-developers/2014q1/003809.html |
5431772f7235
PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents:
4305
diff
changeset
|
4 |
--- INIT.2012-08-01.old/src/cmd/ksh93/sh/subshell.c 2015-02-24 13:25:19.363479570 -0800 |
5431772f7235
PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents:
4305
diff
changeset
|
5 |
+++ INIT.2012-08-01/src/cmd/ksh93/sh/subshell.c 2015-03-05 13:02:10.389323525 -0800 |
5431772f7235
PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents:
4305
diff
changeset
|
6 |
@@ -242,15 +244,22 @@ Namval_t *sh_assignok(register Namval_t |
1705
f76a8a4838a4
17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
7 |
{ |
f76a8a4838a4
17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
8 |
register Namval_t *mp; |
f76a8a4838a4
17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
9 |
register struct Link *lp; |
f76a8a4838a4
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; |
f76a8a4838a4
17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
11 |
- Shell_t *shp = sp->shp; |
f76a8a4838a4
17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
12 |
- Dt_t *dp= shp->var_tree; |
f76a8a4838a4
17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
13 |
+ register struct subshell *sp; |
f76a8a4838a4
17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
14 |
+ Shell_t *shp; |
f76a8a4838a4
17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
15 |
+ Dt_t *dp; |
f76a8a4838a4
17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
16 |
Namval_t *mpnext; |
f76a8a4838a4
17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
17 |
Namarr_t *ap; |
f76a8a4838a4
17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
18 |
int save; |
f76a8a4838a4
17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
19 |
+ |
5129
5431772f7235
PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents:
4305
diff
changeset
|
20 |
+ sp = (struct subshell*)subshell_data; |
1705
f76a8a4838a4
17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
21 |
+ |
f76a8a4838a4
17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
22 |
/* don't bother with this */ |
f76a8a4838a4
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) |
f76a8a4838a4
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) |
f76a8a4838a4
17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
25 |
return(np); |
f76a8a4838a4
17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
26 |
+ |
f76a8a4838a4
17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
27 |
+ shp = sp->shp; |
f76a8a4838a4
17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
28 |
+ dp = shp->var_tree; |
f76a8a4838a4
17851169 ksh93 core dump in sh_assignok() function
Tomas Klacko <tomas.klacko@oracle.com>
parents:
diff
changeset
|
29 |
+ |
5129
5431772f7235
PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents:
4305
diff
changeset
|
30 |
/* don't bother to save if in newer scope */ |
5431772f7235
PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents:
4305
diff
changeset
|
31 |
if(sp->var!=shp->var_tree && sp->var!=shp->var_base && shp->last_root==shp->var_tree) |
5431772f7235
PSARC/2014/162 ksh93 update to 2012-08-01
Lijo George<lijo.x.george@oracle.com>
parents:
4305
diff
changeset
|
32 |
return(np); |