Roland Mainz
2013-07-21 02:50:49 UTC
Hi!
----
The following attempt to print a hexfloat array made out of short
floats crashes ast-ksh.2013-06-28 on SuSE 12.3/AMD64/64bit like this:
-- snip --
$ gdb --args ast_ksh_20130628/build_i386_64bit_debug/arch/linux.i386-64/bin/ksh
-c 'function f { typeset -s -X -a ar=( 2 3 4 ) ; typeset -p ar ; } ;
f'
GNU gdb (GDB) SUSE (7.5.1-2.1.1)
[snip]
(gdb) run
Starting program:
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/arch/linux.i386-64/bin/ksh
-c function\ f\ \{\ typeset\ -s\ -X\ -a\ ar=\(\ 2\ 3\ 4\ \)\ \;\
typeset\ -p\ ar\ \;\ \}\ \;\ f
Program received signal SIGSEGV, Segmentation fault.
0x00000000004470c3 in nv_getval (np=0x7ffff7f31140) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/name.c:2816
2816 d = *up->dp;
(gdb) where
#0 0x00000000004470c3 in nv_getval (np=0x7ffff7f31140) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/name.c:2816
#1 0x0000000000493c15 in nv_getv (np=0x7ffff7f31140,
nfp=0x4000000000000000) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/nvdisc.c:68
#2 0x00000000004a4ea1 in array_getval (np=0x7ffff7f31140,
disc=0x7ffff7f21dd0) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/array.c:621
#3 0x0000000000493b18 in nv_getv (np=0x7ffff7f31140,
nfp=0x4000000000000000) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/nvdisc.c:59
#4 0x0000000000446fb0 in nv_getval (np=0x7ffff7f31140) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/name.c:2786
#5 0x000000000044bc46 in nv_outnode (np=0x7ffff7f31140, out=0x800fe0
<_Sfstdout>, indent=-1, special=0)
at /home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/nvtree.c:695
#6 0x000000000048f1f9 in print_value (iop=0x800fe0 <_Sfstdout>,
np=0x7ffff7f31140, tp=0x7fffffffc510)
at /home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/bltins/typeset.c:516
#7 0x000000000048fb01 in setall (argv=0x7ffff7f2ff10, flag=0,
troot=0x7ffff7ee2880, tp=0x7fffffffc510)
at /home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/bltins/typeset.c:665
#8 0x000000000048ee8a in b_typeset (argc=3, argv=0x7ffff7f2ff08,
context=0x803758 <sh+1368>)
at /home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/bltins/typeset.c:458
#9 0x0000000000468caa in sh_exec (shp=0x803200 <sh>,
t=0x7ffff7f2fe60, flags=7) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/xec.c:1357
#10 0x000000000046bd49 in sh_exec (shp=0x803200 <sh>,
t=0x7ffff7f2fe60, flags=7) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/xec.c:2222
#11 0x0000000000471b02 in sh_funscope_20120720 (shp=0x803200 <sh>,
argn=1, argv=0x7ffff7f1d340, fun=0x0, arg=0x7fffffffd2f0, execflg=5)
at /home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/xec.c:4062
#12 0x000000000046fcaf in sh_funct (shp=0x803200 <sh>,
np=0x7ffff7ee2820, argn=1, argv=0x7ffff7f1d340, envlist=0x0,
execflg=5)
at /home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/xec.c:3371
#13 0x00000000004697ce in sh_exec (shp=0x803200 <sh>,
t=0x7ffff7f1d2e0, flags=5) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/xec.c:1556
#14 0x000000000046bd49 in sh_exec (shp=0x803200 <sh>,
t=0x7ffff7f1d2e0, flags=5) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/xec.c:2222
#15 0x000000000040f532 in exfile (shp=0x803200 <sh>,
iop=0x7ffff7ee04d0, fno=-1) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/main.c:603
#16 0x000000000040e77d in sh_main (ac=3, av=0x7fffffffe1b8,
userinit=0x0) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/main.c:375
#17 0x000000000040d951 in main (argc=3, argv=0x7fffffffe1b8) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/pmain.c:45
(gdb) print *up->dp
Cannot access memory at address 0x4000000000000000
(gdb) print up->dp
$3 = (double *) 0x4000000000000000
----
Bye,
Roland
----
The following attempt to print a hexfloat array made out of short
floats crashes ast-ksh.2013-06-28 on SuSE 12.3/AMD64/64bit like this:
-- snip --
$ gdb --args ast_ksh_20130628/build_i386_64bit_debug/arch/linux.i386-64/bin/ksh
-c 'function f { typeset -s -X -a ar=( 2 3 4 ) ; typeset -p ar ; } ;
f'
GNU gdb (GDB) SUSE (7.5.1-2.1.1)
[snip]
(gdb) run
Starting program:
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/arch/linux.i386-64/bin/ksh
-c function\ f\ \{\ typeset\ -s\ -X\ -a\ ar=\(\ 2\ 3\ 4\ \)\ \;\
typeset\ -p\ ar\ \;\ \}\ \;\ f
Program received signal SIGSEGV, Segmentation fault.
0x00000000004470c3 in nv_getval (np=0x7ffff7f31140) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/name.c:2816
2816 d = *up->dp;
(gdb) where
#0 0x00000000004470c3 in nv_getval (np=0x7ffff7f31140) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/name.c:2816
#1 0x0000000000493c15 in nv_getv (np=0x7ffff7f31140,
nfp=0x4000000000000000) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/nvdisc.c:68
#2 0x00000000004a4ea1 in array_getval (np=0x7ffff7f31140,
disc=0x7ffff7f21dd0) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/array.c:621
#3 0x0000000000493b18 in nv_getv (np=0x7ffff7f31140,
nfp=0x4000000000000000) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/nvdisc.c:59
#4 0x0000000000446fb0 in nv_getval (np=0x7ffff7f31140) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/name.c:2786
#5 0x000000000044bc46 in nv_outnode (np=0x7ffff7f31140, out=0x800fe0
<_Sfstdout>, indent=-1, special=0)
at /home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/nvtree.c:695
#6 0x000000000048f1f9 in print_value (iop=0x800fe0 <_Sfstdout>,
np=0x7ffff7f31140, tp=0x7fffffffc510)
at /home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/bltins/typeset.c:516
#7 0x000000000048fb01 in setall (argv=0x7ffff7f2ff10, flag=0,
troot=0x7ffff7ee2880, tp=0x7fffffffc510)
at /home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/bltins/typeset.c:665
#8 0x000000000048ee8a in b_typeset (argc=3, argv=0x7ffff7f2ff08,
context=0x803758 <sh+1368>)
at /home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/bltins/typeset.c:458
#9 0x0000000000468caa in sh_exec (shp=0x803200 <sh>,
t=0x7ffff7f2fe60, flags=7) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/xec.c:1357
#10 0x000000000046bd49 in sh_exec (shp=0x803200 <sh>,
t=0x7ffff7f2fe60, flags=7) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/xec.c:2222
#11 0x0000000000471b02 in sh_funscope_20120720 (shp=0x803200 <sh>,
argn=1, argv=0x7ffff7f1d340, fun=0x0, arg=0x7fffffffd2f0, execflg=5)
at /home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/xec.c:4062
#12 0x000000000046fcaf in sh_funct (shp=0x803200 <sh>,
np=0x7ffff7ee2820, argn=1, argv=0x7ffff7f1d340, envlist=0x0,
execflg=5)
at /home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/xec.c:3371
#13 0x00000000004697ce in sh_exec (shp=0x803200 <sh>,
t=0x7ffff7f1d2e0, flags=5) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/xec.c:1556
#14 0x000000000046bd49 in sh_exec (shp=0x803200 <sh>,
t=0x7ffff7f1d2e0, flags=5) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/xec.c:2222
#15 0x000000000040f532 in exfile (shp=0x803200 <sh>,
iop=0x7ffff7ee04d0, fno=-1) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/main.c:603
#16 0x000000000040e77d in sh_main (ac=3, av=0x7fffffffe1b8,
userinit=0x0) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/main.c:375
#17 0x000000000040d951 in main (argc=3, argv=0x7fffffffe1b8) at
/home/test001/work/ast_ksh_20130628/build_i386_64bit_debug/src/cmd/ksh93/sh/pmain.c:45
(gdb) print *up->dp
Cannot access memory at address 0x4000000000000000
(gdb) print up->dp
$3 = (double *) 0x4000000000000000
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)