Michal, does the bug not happen if you compile ksh with out
optimisation, i.e. -g and not -O*?

Olga

2012/3/14 ольга крыжановская <[email protected]>:
> Michal, does the bug not happen if you replace echo $(latestver) with
> echo ${ latestver; }?
> ${[blank]cmd;} is like $(cmd) but does not create a sub shell for the
> command substitution. Might be a related issue, based on Roland's
> experience.
>
> Olga
>
> On Wed, Mar 14, 2012 at 12:22 PM, Michal Hlavinka <[email protected]> wrote:
>> Hi,
>>
>> I found regression in ksh. One my script hang and ksh started to eat memory
>> very quickly. This happens with ksh 2012-01-01 and newer, ksh 2011-06-30
>> works fine. I found it only now, because the script causing this is the
>> script that updates ksh package to newer version.
>>
>> This is simplified reproducer:
>> #!/bin/ksh
>> latestver()
>> {
>>    rpmdev-vercmp 20120214 20120229 >/dev/null
>> }
>>
>> echo $(latestver)
>>
>> but it depends on rpmdev-vercmp, so I don't know how much useful it is for
>> you.
>>
>> When I remove /dev/null redirection or when I call latestver directly, it
>> works fine.
>>
>> Attached are two strace outputs. kshbroken.log was obtained with 2012-02-29,
>> kshworking.log was obtained with 2011-06-30.
>>
>> Michal
>>
>> _______________________________________________
>> ast-developers mailing list
>> [email protected]
>> https://mailman.research.att.com/mailman/listinfo/ast-developers
>>
>
>
>
> --
>       ,   _                                    _   ,
>      { \/`o;====-    Olga Kryzhanovska   -====;o`\/ }
> .----'-/`-/     [email protected]   \-`\-'----.
>  `'-..-| /       http://twitter.com/fleyta     \ |-..-'`
>       /\/\     Solaris/BSD//C/C++ programmer   /\/\
>       `--`                                      `--`



-- 
      ,   _                                    _   ,
     { \/`o;====-    Olga Kryzhanovska   -====;o`\/ }
.----'-/`-/     [email protected]   \-`\-'----.
 `'-..-| /       http://twitter.com/fleyta     \ |-..-'`
      /\/\     Solaris/BSD//C/C++ programmer   /\/\
      `--`                                      `--`

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

Reply via email to