Glenn Fowler wrote:
> On Sun, 27 Aug 2006 23:31:56 +0200 Roland Mainz wrote:
> > ksh93r+_alpha_20060724 (however some of the previous alphas were
> > affected too) sometimes hangs when running the "heredoc.sh" test script
> > in a multibyte locale like "ja_JP.PCK" (other multibyte locales hit this
> > problem, too, however I have the feeling that the *.UTF-8 ones are less
> > commonly affected than the non-UTF-8 ones (like PCK, GB18030, EUC
> > etc.)). I am not sure whether this is problem in the Solaris code
> > (CC:'ing the i18n-discuss at opensolaris.org that Ienup can take a look at
> > the problem) or in the ksh93 codebase.
>
> > The symptoms are simply that the shell process hangs around, consuming
> > 100% CPU time and does not respond to SIGTERM/SIGHUP, it seems only
> > SIGKILL can end this problem.
>
> thanks
> there is a typo in ksh93/sh/macro.c
>
> try this patch (your line numbers will be slightly off)
> and see if it still hangs
>
> --- .../sh/macro.c Fri Aug 25 18:49:17 2006
> +++ sh/macro.c Mon Aug 28 17:57:28 2006
> @@ -406,7 +406,7 @@
> ssize_t len;
> do
> {
> - switch(len = mbsize(sp))
> + switch(len = mbsize(cp))
> {
> case -1: /* illegal multi-byte char */
> case 0:
>
Yes, that patch seems to cure the problem (at least there was no hang
anymore, even after 50 test runs). Thanks for the quick fix... :-)
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 7950090
(;O/ \/ \O;)