On Mon, Sep 16, 2013 at 6:05 PM, Roland Mainz <roland.ma...@nrubsig.org> wrote:
> Attached (as "astksh20130913_gb18030_mbinit_fixes001.diff.txt") is a
> patch which fixes some issues related to shift state handling which
> were found during testing with \u[hex] and \w[hex] ...
>
> * Notes:
> - The Euro symbol (Unicode codepoint 0x20ac) may or may not return
> |true| for |iswalpha(wchar_euro)| ... this was the issue where the
> "wchar.sh" test was tripping over with "zh_CN.GB18030" on Solaris
> 11/B145

The following testcase "hangs" on Solaris 11/B145/AMD64/64bit ... with
LC_ALL="en_US.UTF-8" as local
-- snip --
# test 2a: Edward Pilatowicz <edward.pilatow...@sun.com>'s
Solaris-specific testcase
# prechecks
[[ -f "/etc/termcap" ]] || print -u2 "/etc/termcap missing"

# common functions/variables
function isvalidpid
{
    kill -n 0 ${1} 2>/dev/null && return 0
    return 1
}

tmpfile='mytmp.txt'

${SHELL} -o errexit -c \
    'builtin uniq ; set -- `cat /etc/termcap | sort | uniq` ; true'
2>"${tmpfile}" >/dev/null &
(( childpid=$! ))
sleep 15
sync
if isvalidpid ${childpid} ; then
    print -u2 "test2a: child (pid=${childpid}) still busy."
    pstack ${childpid}
    kill -s KILL ${childpid} 2>/dev/null
fi

wait
(( exitcode=$? ))

if (( exitcode != 0 )) ; then
    # wait for child (and/or avoid zombies/slime)
    print -u2 "test2a: Child returned non-zero exit code ${exitcode}."
fi
-- snip --
... the output looks like this:
-- snip --
$ (export SHELL=~/bin/ksh ; $SHELL test.sh )
test2a: child (pid=11755) still busy.
11755:  /home/test001/bin/ksh -o errexit -c builtin uniq ; set -- `cat /etc/te
 fffffd7fff24b60a write    (1, fffffd7fff036c40, 43)
 00000000005d5397 sfwr () + 5d7
 00000000005b4756 _sfflsbuf () + 526
 00000000005d5d4e sfwrite () + 71e
 0000000000637d06 uniq () + 786
 000000000063853e b_uniq () + 57e
 00000000004c836d sh_exec () + 284d
 00000000004ca92f sh_exec () + 4e0f
 00000000004cb7e9 sh_exec () + 5cc9
 00000000004be63c sh_subshell () + c3c
 0000000000485967 comsubst () + 1157
 000000000047cbe3 copyto () + d73
 000000000047a9c7 sh_macexpand () + 4c7
 000000000051cc15 arg_expand () + 1a5
 000000000051c152 sh_argbuild () + 172
 00000000004c60ad sh_exec () + 58d
 00000000004cbba7 sh_exec () + 6087
 00000000004434f7 exfile () + 1147
 0000000000442372 sh_main () + 1802
 0000000000440a22 main () + 92
 000000000044083c ???????? ()
-- snip --

A more detailed stack trace looks like this:
-- snip --
Attached to process 11876
stopped in __write at 0xfffffd7fff24b60a
0xfffffd7fff24b60a: __write+0x000a:     jae      __write+0x16   [
0xfffffd7fff24b616, .+0xc ]
Current function is sfwr
  209                                   if((w = syswritef(f->file,buf,n)) > 0)
  [1] __write(0x1, 0xfffffd7fff036c40, 0x43, 0x0, 0x6d28c0, 0x43), at
0xfffffd7fff24b60a
  [2] write(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff23109f
=>[3] sfwr(f = 0x6d28c0, buf = 0xfffffd7fff036c40, n = 67U, disc =
0xfffffd7fff050eb0), line 209 in "sfwr.c"
  [4] _sfflsbuf(f = 0x6d28c0, c = -1), line 97 in "sfflsbuf.c"
  [5] sfwrite(f = 0x6d28c0, buf = 0xfffffd7fff036c40, n = 0), line 149
in "sfwrite.c"
  [6] uniq(fdin = 0x6d2810, fdout = 0x6d28c0, fields = 0, chars = 0,
width = -1, mode = 0, all = (nil), compare = 0x43f6c0), line 209 in
"uniq.c"
  [7] b_uniq(argc = 1, argv = 0xfffffd7fff04cca8, context = 0x6cefd0),
line 338 in "uniq.c"
  [8] sh_exec(shp = 0x6ceae8, t = 0xfffffd7fff04cc40, flags = 4), line
1379 in "xec.c"
  [9] sh_exec(shp = 0x6ceae8, t = 0xfffffd7fff04ccb0, flags = 5), line
1984 in "xec.c"
  [10] sh_exec(shp = 0x6ceae8, t = 0xfffffd7fff04ccb0, flags = 5),
line 2203 in "xec.c"
  [11] sh_subshell(shp = 0x6ceae8, t = 0xfffffd7fff04ccf0, flags = 5,
comsub = 1), line 603 in "subshell.c"
  [12] comsubst(mp = 0xfffffd7fff024820, t = 0xfffffd7fff04ccf0, type
= 1), line 2164 in "macro.c"
  [13] copyto(mp = 0xfffffd7fff024820, endch = 0, newquote = 0), line
601 in "macro.c"
  [14] sh_macexpand(shp = 0x6ceae8, argp = 0xfffffd7fff04c940, arghead
= 0xfffffd7fffdff358, flag = 0), line 245 in "macro.c"
  [15] arg_expand(shp = 0x6ceae8, argp = 0xfffffd7fff04c940, argchain
= 0xfffffd7fffdff358, flag = 0), line 1112 in "args.c"
  [16] sh_argbuild(shp = 0x6ceae8, nargs = 0xfffffd7fffdff4ec, comptr
= 0xfffffd7fff04c8e0, flag = 0), line 950 in "args.c"
  [17] sh_exec(shp = 0x6ceae8, t = 0xfffffd7fff04c8e0, flags = 4),
line 992 in "xec.c"
  [18] sh_exec(shp = 0x6ceae8, t = 0xfffffd7fff04ca10, flags = 5),
line 2252 in "xec.c"
  [19] exfile(shp = 0x6ceae8, iop = 0xfffffd7fff0224d0, fno = -1),
line 610 in "main.c"
  [20] sh_main(ac = 5, av = 0xfffffd7fffdffa48, userinit = (nil)),
line 382 in "main.c"
  [21] main(argc = 5, argv = 0xfffffd7fffdffa48), line 45 in "pmain.c"
detaching from process 11876
-- snip -

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.ma...@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)
_______________________________________________
ast-developers mailing list
ast-developers@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to