On 9.7.2013 18:42, Michal Hlavinka wrote:
Hi,
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`
Nonexisting file is not required for reproducer, it's just much faster
than using ls or ls *
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
FPATH=.
autoload test48_autoload
### and call it in a loop
a=`test48_autoload`
again, ksh eats more and more memory.
Complete reproducers are attached.
Michal
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers