No fix. KSH_VERSION is a read only variable, always defined to be
nameref for .sh.version, which itself is set at shell startup time to
the version of the ksh shell. Setting it is not allowed, nor useful,
by definition.

Olga

On Mon, Jan 6, 2014 at 5:45 PM, Tomas Klacko <[email protected]> wrote:
> Hi,
>
> Setting the KSH_VERSION variable to some value before running ksh
> from other shell makes the ksh to core dump:
>
> user@host:~$ env | grep SHELL
> SHELL=/bin/bash
> XTERM_SHELL=/bin/bash
> user@host:~$ export KSH_VERSION=abcd
> user@host:~$ ksh
> Segmentation Fault (core dumped)
> user@host:~$
>
> For KSH_VERSION=abcd, ksh does (at the end of the nv_putval() function)
> memmove(cp,sp,dot);):
>
>     np->nvalue.cp="abcd"
>
> the code then later uses:
>
>     np->nvalue.nrp->np
>
> which contains "abcd" as pointer value.
>
> What should be the fix here?
>
> Tomas Klacko
> _______________________________________________
> ast-developers mailing list
> [email protected]
> http://lists.research.att.com/mailman/listinfo/ast-developers



-- 
      ,   _                                    _   ,
     { \/`o;====-    Olga Kryzhanovska   -====;o`\/ }
.----'-/`-/     [email protected]   \-`\-'----.
 `'-..-| /       http://twitter.com/fleyta     \ |-..-'`
      /\/\     Solaris/BSD//C/C++ programmer   /\/\
      `--`                                      `--`
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to