I whittled down the script to something manageable. The following script will
cause the memory
fault if given a sufficiently deep directory. For the beta meerkat livecd,
/usr/lib is sufficiently deep
and /usr/bin (the default script argument if none is supplied) is not.
Here's the script:
#!/bin/ksh
function recursive_directory_read {
typeset function_to_call directory_to_read filename is_link is_directory
directory_to_read=$1
function_to_call=$2
ls -a $directory_to_read | while read f ; do
if [[ "$f" = '.' || "$f" = '..' ]] ; then
continue
elif [[ -L $directory_to_read/"$f" ]] ; then
continue
elif [[ -d $directory_to_read/"$f" ]] ; then
recursive_directory_read $directory_to_read/"$f" $function_to_call
else
$function_to_call $directory_to_read $f
fi
done
}
function print_it {
echo "$1/$2"
}
function testit {
recursive_directory_read $1 print_it
}
ulimit -c unlimited
testit ${1:-/usr/bin}
--
ksh93 crashed with SIGSEGV
https://bugs.launchpad.net/bugs/638867
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs