I recently tried the regression tests for the ksh debugger on Ubuntu (Lucid)
and have gotten SEGVs on every recent version I tried. Specifically


   1.  The version that comes with Ubuntu: 2009-05-01,
   2.   2010-03-09 for which i can get a linux.i386 binary,
   3.   2010-06-21 which I built from source (using ./bin/package make)

Here is how to reproduce on Ubuntu

   git clone git://github.com/rocky/kshdb.git
   cd kshdb
   ./autogen.sh
   make && make check

This will run a number of tests and it gives SEGVs on two or three
integration tests. To narrow to run just one of the SEGV'd tests:

 $ cd test/integration:
> ksh -- ../../kshdb -L ../.. -n -B -q -x ../../test/data/list.cmd
> ../../test/example/dbg-test1.sh
> (dbg-test1.sh:22):
> x=22
> +# Test of debugger 'list' command
> +#
> +help l
> list [LOC|.|-] [COUNT] -- List COUNT lines of a script starting from LOC
>
> START is the starting location or dot (.) for current file and
> line. Subsequent list commands continue from the last line
> listed. Frame switching however resets the line to dot.
>
> If COUNT is omitted, use the setting LISTSIZE. Use "set listsize" to
> change this setting.
>
> Aliases for list: l
> +### List default location
> +list
>  22: => x=22
>  23:    y=23
>  24:    for i in 0 1 3 ; do
>  25:      ((x += i))
>  26:    done
>  27:    x=27
>  28:    y=b
>  29:    x=29
>  30:    echo $(fn3 30)
>  31:    fn3 31
> +### Should list next sets of lines
> +list
>  32:    fn1;
>  33:    fn3 33
>  34:    # source example/dbg-test1.sub
>  35:    exit 0;
> discipline not replaced
>  36:
> +list
> discipline not replaced
>  36:
> +list
> Segmentation fault
> $
>

Running ksh under gdb, after the above output I get:



        Program received signal SIGSEGV, Segmentation fault.
>         0x0000002d in ?? ()
>         (gdb) where
>         #0  0x0000002d in ?? ()
>         #1  0x080594a2 in nv_putv ()
>         #2  0x080621b5 in array_putval ()
>         #3  0x080594a2 in nv_putv ()
>         #4  0x0807f3e3 in nv_putval ()
>         #5  0x08060612 in nv_setvec ()
>         #6  0x0808391f in nv_setlist ()
>         #7  0x08096adc in sh_exec ()
>         #8  0x0809bf3c in sh_eval ()
>         #9  0x080a7516 in b_eval ()
>         #10 0x08097307 in sh_exec ()
>         #11 0x08098ac2 in sh_exec ()
>         #12 0x080a7167 in b_dot_cmd ()
>         #13 0x0809b5ad in sh_funct ()
>         #14 0x08097887 in sh_exec ()
>         #15 0x08098ac2 in sh_exec ()
>         #16 0x080a7167 in b_dot_cmd ()
>         #17 0x0809b5ad in sh_funct ()
>         #18 0x08097887 in sh_exec ()
>         #19 0x08098ac2 in sh_exec ()
>         #20 0x08099834 in sh_exec ()
>         #21 0x08098ac2 in sh_exec ()
>         #22 0x080a7167 in b_dot_cmd ()
>         #23 0x0809b5ad in sh_funct ()
>         #24 0x08097887 in sh_exec ()
>         #25 0x08098ac2 in sh_exec ()
>         #26 0x080992ef in sh_exec ()
>         #27 0x08098ac2 in sh_exec ()
>         #28 0x080992ef in sh_exec ()
>         #29 0x08098ac2 in sh_exec ()
>         #30 0x0809b1bc in sh_funscope ()
>         #31 0x0809b5ee in sh_funct ()
>         #32 0x08097887 in sh_exec ()
>         #33 0x08098ac2 in sh_exec ()
>         #34 0x080a7167 in b_dot_cmd ()
>         #35 0x0809b5ad in sh_funct ()
>         #36 0x08097887 in sh_exec ()
>         #37 0x08098ac2 in sh_exec ()
>         #38 0x0809960f in sh_exec ()
>         #39 0x08098ac2 in sh_exec ()
>         #40 0x0809b1bc in sh_funscope ()
>         #41 0x0809b5ee in sh_funct ()
>         #42 0x08097887 in sh_exec ()
>         #43 0x0809bf3c in sh_eval ()
>         #44 0x080657e6 in sh_trap ()
>         #45 0x08095b4e in sh_debug ()
>         #46 0x0808417a in nv_setlist ()
>         #47 0x08096adc in sh_exec ()
>         #48 0x08098ac2 in sh_exec ()
>         #49 0x0809bf3c in sh_eval ()
>         #50 0x080a71fb in b_dot_cmd ()
>         #51 0x08097307 in sh_exec ()
>         #52 0x08098adf in sh_exec ()
>         #53 0x0809bf3c in sh_eval ()
>         #54 0x080a7516 in b_eval ()
>         #55 0x08097307 in sh_exec ()
>         #56 0x08098ac2 in sh_exec ()
>         #57 0x080992ef in sh_exec ()
>         #58 0x08057e23 in exfile ()
>         #59 0x080587fe in sh_main ()
>         #60 0x08057223 in main ()
>         (gdb) quit
>
> If debugging locations are desired, remind me how I built do get that.

Thanks.
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to