David Korn
2013-07-09 20:34:50 UTC
cc: mhlavink at redhat.com
Subject: Re: we found two memory leaks in ksh
--------
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
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.### 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
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