==== cut ====
typeset -a sharedarray
typeset -T sharedarray_t=(
create()
{
printf "#create:|%s|\n" "$@"
printf "#create name=%q, subscript=%q, value=%q\n" "${.sh.name}"
"${.sh.subscript}" "${.sh.value}"
}
set()
{
printf "#set:|%s|\n" "$@"
printf "#set name=%q, subscript=%q, value=%q\n" "${.sh.name}"
"${.sh.subscript}" "${.sh.value}"
}
get()
{
printf "#get:|%s|\n" "$@"
printf "#get name=%q, subscript=%q, value=%q\n" "${.sh.name}"
"${.sh.subscript}" "${.sh.value}"
}
)
set -x
sharedarray_t -a x
x[5]="5x"
==== cut ====
This script was an accident but it causes ast-ksh.2010-03-09 to crash
on Solaris 11 64bit SPARC.
dbx shows this stack trace:
program terminated by signal BUS (invalid address alignment)
Current function is bestfree
883 bp = BLOCK(data); s = SIZE(bp);
(dbx) where
=>[1] bestfree(vm = 0x100347c28, data = 0x1001ebe7a), line 883 in "vmbest.c"
[2] _ast_free(data = 0x1001ebe7a), line 354 in "malloc.c"
[3] nv_settype(np = 0x10036ee30, tp = 0x10036ce50, flags = 0), line
1342 in "nvtype.c"
[4] b_common(argv = 0x100363d60, flag = 512, troot = 0x1003660b0, tp
= 0xffffffff7ffff188), line 576 in "typeset.c"
[5] b_typeset(argc = 3, argv = 0x100363d58, extra = 0x100343c10),
line 401 in "typeset.c"
[6] sh_exec(t = 0x100363cb0, flags = 4), line 1008 in "xec.c"
[7] exfile(shp = 0x100343740, iop = 0x10036bb40, fno = 10), line 600
in "main.c"
[8] sh_main(ac = 2, av = 0xffffffff7ffffab8, userinit = (nil)), line
372 in "main.c"
[9] main(argc = 2, argv = 0xffffffff7ffffab8), line 46 in "pmain.c"
Olga
--
, _ _ ,
{ \/`o;====- Olga Kryzhanovska -====;o`\/ }
.----'-/`-/ [email protected] \-`\-'----.
`'-..-| / Solaris/BSD//C/C++ programmer \ |-..-'`
/\/\ /\/\
`--` `--`
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users