diff --git a/ksh.changes b/ksh.changes index 11ebbe7..93d7288 100644 --- a/ksh.changes +++ b/ksh.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 3 14:47:52 CEST 2010 - werner@suse.de + +- Add patch from mail list tp avoid deadlock in builtin `whence' + ------------------------------------------------------------------- Fri Apr 9 10:46:24 CEST 2010 - werner@suse.de diff --git a/ksh.spec b/ksh.spec index d5fc9e8..f00f9ce 100644 --- a/ksh.spec +++ b/ksh.spec @@ -37,7 +37,7 @@ Requires(preun): update-alternatives %endif AutoReqProv: on Version: 93t -Release: 22 +Release: 23 Summary: Korn Shell BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: INIT.2010-03-09.tar.bz2 @@ -66,6 +66,7 @@ Patch13: ksh93-tty.dif Patch14: ksh93-ia64.dif Patch15: ksh93-s390.dif Patch16: ksh93-sigchld.dif +Patch17: ksh93-whence-deadlock.dif %global use_suid_exe 0 %global use_locale 1 %global debug_memleak 0 @@ -133,6 +134,7 @@ find share/ -type d -a -empty | xargs -r rm -vrf %endif %patch15 %patch16 +%patch17 %build typeset -i IGNORED=0x$(ps --no-headers -o ignored $$) diff --git a/ksh93-whence-deadlock.dif b/ksh93-whence-deadlock.dif new file mode 100644 index 0000000..226ca54 --- /dev/null +++ b/ksh93-whence-deadlock.dif @@ -0,0 +1,34 @@ +|Hi, +| +|I've got another bug report from one Fedora user. When whence builtin is used +|with -q option it hangs. Whence was modified a lot between 2008-02-02 and +|2008-07-25. New version uses while(pp) loop but for Q_FLAG pp never changes +|causing ksh loop forever. I've just added pp = 0 to Q_FLAG if-section and it +|seems working fine: +| +--- src/cmd/ksh93/bltins/whence.c ++++ src/cmd/ksh93/bltins/whence.c 2010-04-29 12:03:22.744013139 ++0200 +@@ -234,7 +234,10 @@ static int whence(Shell_t *shp,char **ar + } + } + if(flags&Q_FLAG) ++ { + r |= !cp; ++ pp = 0; ++ } + else if(cp) + { + if(flags&V_FLAG) + + +|Btw, when looking in the code it seems tofree variable is never checked when +|Q_FLAG is used and also in the loop this value is sometimes set to 1, but +|never zeroed once it is set, is it expected? +| +|Regards, +|Michal Hlavinka +|_______________________________________________ +|ast-developers mailing list +|ast-developers@research.att.com +|https://mailman.research.att.com/mailman/listinfo/ast-developers