Hi!
----
Below is a testcase which causes ast-ksh.2009-06-22 to crash:
-- snip --
#! /usr/bin/ksh93
function modify_target_param
{
integer -S nest=5
set -o xtrace
usage=":"
usage="${usage}B:(bi-directional-authentication)"
while getopts "${usage}" option
do
case ${option} in
"B")
bi="${OPTARG}"
;;
"?")
(( OPTIND = ${OPTIND} + 1 ))
;;
esac
(( nest-- > 0 )) && modify_target_param -B enable target
>/dev/null
2>&1
done
}
modify_target_param -B enable target
-- snip --
... the stacktrace looks like this:
-- snip --
$ ksh93
getoptste.sh
+ usage=:
+ usage=':B:(bi-directional-authentication)'
+ getopts ':B:(bi-directional-authentication)' option
+ bi=enable
+ (( nest-- > 0 ))
+ modify_target_param -B enable target
+ 1> /dev/null 2>& 1
Bus error(coredump)
$ dbx ksh93 core
[snip]
program terminated by signal BUS (invalid address alignment)
Current function is sfswap
45 if(f2 && SFFROZEN(f2) && (f2->mode&SF_PUSH) )
(dbx) wjere
wjere: not found
(dbx) where
=>[1] sfswap(f1 = 0x100376690, f2 = 0x801), line 45 in "sfswap.c"
[2] sh_iorestore(shp = 0x100337430, last = 0, jmpval = 0), line 1557
in "io.c"
[3] sh_exec(t = 0x1003746a0, flags = 516), line 1132 in "xec.c"
[4] sh_exec(t = 0x1003748e0, flags = 516), line 1556 in "xec.c"
[5] sh_exec(t = 0x1003748e0, flags = 516), line 1548 in "xec.c"
[6] sh_exec(t = 0x1003741d0, flags = 7), line 1743 in "xec.c"
[7] sh_exec(t = 0x1003741d0, flags = 7), line 1548 in "xec.c"
[8] sh_funscope(argn = 4, argv = 0x1003579d0, fun = (nil), arg =
0xffffffff7ffff1e0, execflg = 5), line 2624 in "xec.c"
[9] sh_funct(shp = 0x100337430, np = 0x100373d10, argn = 4, argv =
0x1003579d0, envlist = (nil), execflg = 5), line 2704 in "xec.c"
[10] sh_exec(t = 0x100357910, flags = 5), line 1125 in "xec.c"
[11] exfile(shp = 0x100337430, iop = 0x100373920, fno = 10), line 595
in "main.c"
[12] sh_main(ac = 2, av = 0xffffffff7ffffad8, userinit = (nil)), line
370 in "main.c"
[13] main(argc = 2, argv = 0xffffffff7ffffad8), line 46 in "pmain.c"
(dbx)
-- snip --
... e.g. it looks like that |f2| passed to |sfswap()| is garbage... ;-(
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) [email protected]
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users