Discussion:
[ast-developers] we found two memory leaks in ksh
David Korn
2013-07-09 20:34:50 UTC
Permalink
cc: mhlavink at redhat.com
Subject: Re: we found two memory leaks in ksh
--------
1) first one is related to an alias.
### set up
alias ls='/bin/ls -ltr'
### and call it in a loop
a=`ls some_file_that_does_not_exist 2>/dev/null`
as a result, ksh eats more and more memory
2) second one is related to autoloaded functions
### set up
cat >test48_autoload <<EOF
#!/bin/ksh
function test48_autoload
{
echo "function call"
}
EOF
Thanks, I can reproduce the problem and hope to have a fix next week.
The first leak doesn't happen with ksh93u and the second one only
has a small leak in ksh93u which I have a fix for.

David Korn
dgk at research.att.com
Michal Hlavinka
2013-07-10 08:49:23 UTC
Permalink
Post by David Korn
cc: mhlavink at redhat.com
Subject: Re: we found two memory leaks in ksh
--------
1) first one is related to an alias.
### set up
alias ls='/bin/ls -ltr'
### and call it in a loop
a=`ls some_file_that_does_not_exist 2>/dev/null`
as a result, ksh eats more and more memory
2) second one is related to autoloaded functions
### set up
cat >test48_autoload <<EOF
#!/bin/ksh
function test48_autoload
{
echo "function call"
}
EOF
Thanks, I can reproduce the problem and hope to have a fix next week.
The first leak doesn't happen with ksh93u and the second one only
has a small leak in ksh93u which I have a fix for.
I'm able to reproduce first and second leak with both
ksh93u+ (2012-08-01) and ksh93v- (2013-06-28).
ksh93v-

Continue reading on narkive:
Loading...