Dr. Werner Fink 2010-10-27 12:15:33 +00:00 committed by Git OBS Bridge
parent 8ab2acc0f2
commit 01419c61dd
2 changed files with 40 additions and 3 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Oct 27 14:14:28 CEST 2010 - werner@suse.de
- Change fix for bnc#636389 to my first approach as this
does not hang on x86_64
-------------------------------------------------------------------
Thu Oct 21 12:36:44 CEST 2010 - werner@suse.de

View File

@ -1,10 +1,41 @@
---
src/cmd/ksh93/sh/init.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
--- src/cmd/ksh93/sh/init.c
+++ src/cmd/ksh93/sh/init.c Fri Oct 8 13:16:10 2010
@@ -1709,6 +1709,7 @@
+++ src/cmd/ksh93/sh/init.c 2010-10-08 12:43:27.123926224 +0000
@@ -456,6 +456,8 @@ static void put_cdpath(register Namval_t
}
#endif /* _hdr_locale */
+static const void* ifs_hdr;
+
/* Trap for IFS assignment and invalidates state table */
static void put_ifs(register Namval_t* np,const char *val,int flags,Namfun_t *fp)
{
@@ -464,9 +466,14 @@ static void put_ifs(register Namval_t* n
ip->ifsnp = 0;
if(!val)
{
- fp = nv_stack(np, NIL(Namfun_t*));
- if(fp && !fp->nofree)
- free((void*)fp);
+ Namfun_t *xp = nv_stack(np, NIL(Namfun_t*));
+ if(xp)
+ {
+ if(xp == ifs_hdr)
+ xp->nofree = 1;
+ if(xp->nofree == 0)
+ free((void*)xp);
+ }
}
if(val != np->nvalue.cp)
nv_putv(np, val, flags, fp);
@@ -1597,6 +1604,7 @@ static Init_t *nv_init(Shell_t *shp)
ip->LANG_init.nofree = 1;
#endif /* _hdr_locale */
nv_stack(IFSNOD, &ip->IFS_init.hdr);
+ ip->IFS_init.hdr.nofree = 1;
+ ifs_hdr = (IFSNOD)->nvfun;
nv_stack(PATHNOD, &ip->PATH_init);
nv_stack(FPATHNOD, &ip->FPATH_init);
nv_stack(CDPNOD, &ip->CDPATH_init);