On Thu, Aug 8, 2013 at 11:40 PM, Cedric Blancher
<[email protected]> wrote:
> ksh (ast-ksh.20130807) crashes on my Fedora laptop if I try to copy
> the information in .sh.sig to an array for later use:
>
> ksh -c 'compound c ; compound -a c.car; integer c.cari=0; trap
> "typeset -c c.car[\$((c.cari++))]=.sh.sig" USR1; kill -q4 -s USR1 $$;
> kill -q5 -s USR1 $$; true ; print -v c'
> Segmentation fault
>
> (I don't have a usable stack trace because this is an optimized build.
> Roland, could to have a look please?)
The following variation of Cedric's testcase doesn't crash but doesn't
print the correct .sh.sig data either:
-- snip --
$ cat test1.sh
compound c
compound -a c.car
integer c.cari=0
integer trap_i
trap '(( trap_i=c.cari++ )) ; typeset -c "c.car[$trap_i]=.sh.sig"' USR1
kill -q4 -s USR1 $$
kill -q5 -s USR1 $$
true
print -v c
$ ./arch/linux.i386-64/bin/ksh -x test1.sh
+ typeset -C c
+ typeset -C -a c.car
+ c.cari=0
+ typeset -li c.cari
+ typeset -li trap_i
+ trap '(( trap_i=c.cari++ )) ; typeset -c "c.car[$trap_i]=.sh.sig"' USR1
+ kill -q4 -s USR1 55344
+ (( trap_i=c.cari++ ))
+ typeset -c 'c.car[0]=.sh.sig'
+ kill -q5 -s USR1 55344
+ (( trap_i=c.cari++ ))
+ typeset -c 'c.car[1]=.sh.sig'
+ true
+ print -v c
(
typeset -C -a car=(
(
)
(
)
)
typeset -l -i cari=2
)
-- snip --
Grumpf... ;-(
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) [email protected]
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers