thanks
from the ksh93 RELEASE file distributed with the source:

11-08-02  A bug in the saving and restoring of IFS in command substitution that
          cause case a core dump has been fixed.

On Thu, 9 Feb 2012 14:10:52 +0100 Thomas Hood wrote:
> Here's an even simpler script which causes the segfault.  I also show
> the backtrace in gdb.  // Thomas

> $ cat a
> (IFS=)
> function g { IFS=  ; }
> function f { typeset IFS  ;  (g)  ;  : $V  ; }
> f
> $ ksh a
> Segmentation fault
> $ ksh --version
>   version         sh (AT&T Research) 93u 2011-02-08
> $ which ksh
> /usr/bin/ksh
> $ gdb /usr/bin/ksh
> GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08
> Copyright (C) 2011 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-linux-gnu".
> For bug reporting instructions, please see:
> <http://bugs.launchpad.net/gdb-linaro/>...
> Reading symbols from /usr/bin/ksh...done.
> (gdb) run a
> Starting program: /usr/bin/ksh a

> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000000782730 in ?? ()
> (gdb) bt
> #0  0x0000000000782730 in ?? ()
> #1  0x00000000004395d7 in nv_getval (np=0x782600)
>     at /home/jdthood/tmp/ksh-93u/src/cmd/ksh93/sh/name.c:2647
> #2  0x0000000000435729 in sh_macexpand (shp=0x763de0, argp=0x7822c0,
> arghead=0x7fffffffcb28,
>     flag=<optimized out>) at
> /home/jdthood/tmp/ksh-93u/src/cmd/ksh93/sh/macro.c:207
> #3  0x0000000000476feb in arg_expand (flag=0, argchain=0x7fffffffcb28,
> argp=0x7822c0, shp=0x763de0)
>     at /home/jdthood/tmp/ksh-93u/src/cmd/ksh93/sh/args.c:871
> #4  sh_argbuild (shp=0x763de0, nargs=0x7fffffffd074, comptr=<optimized
> out>, flag=<optimized out>)
>     at /home/jdthood/tmp/ksh-93u/src/cmd/ksh93/sh/args.c:728
> #5  0x0000000000456672 in sh_exec (t=0x782280, flags=7)
>     at /home/jdthood/tmp/ksh-93u/src/cmd/ksh93/sh/xec.c:916
> #6  0x00000000004568e5 in sh_exec (t=0x782280, flags=7)
>     at /home/jdthood/tmp/ksh-93u/src/cmd/ksh93/sh/xec.c:1973
> #7  0x0000000000455e39 in sh_funscope (argn=<optimized out>,
> argv=0x772190, fun=0, arg=0x7fffffffd910,
>     execflg=5) at /home/jdthood/tmp/ksh-93u/src/cmd/ksh93/sh/xec.c:3222
> #8  0x0000000000456230 in sh_funct (shp=0x763de0, np=0x76afb0, argn=1,
> argv=0x772190, envlist=0x0,
>     execflg=5) at /home/jdthood/tmp/ksh-93u/src/cmd/ksh93/sh/xec.c:3308
> #9  0x000000000045b16b in sh_exec (t=0x772130, flags=5)
>     at /home/jdthood/tmp/ksh-93u/src/cmd/ksh93/sh/xec.c:1397
> #10 0x0000000000408950 in exfile ()
> #11 0x0000000000407d8f in sh_main ()
> #12 0x00007ffff75d630d in __libc_start_main () from
> /lib/x86_64-linux-gnu/libc.so.6
> #13 0x0000000000406fe1 in _start ()
> (gdb)
> _______________________________________________
> ast-developers mailing list
> [email protected]
> https://mailman.research.att.com/mailman/listinfo/ast-developers

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

Reply via email to