leaks.sh revision 3f54fd611f536639ec30dd53c48e5ec1897cc7d9
########################################################################
# #
# This software is part of the ast package #
# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
# Florham Park NJ #
# #
# David Korn <dgk@research.att.com> #
# #
########################################################################
function err_exit
{
print -u2 -n "\t"
let Errors+=1
}
alias err_exit='err_exit $LINENO'
integer Errors=0
# test for variable reset leak #
function test_reset
{
integer i n=$1
for ((i = 0; i < n; i++))
do u=$i
done
}
n=1000
# one round to get to steady state -- sensitive to -x
test_reset $n
test_reset $n
test_reset $n
if (( b > a ))
fi
# buffer boundary tests
done
data="(v=;sid=;di=;hi=;ti='1328244300';lv='o';id='172.3.161.178';var=(k='conn_num._total';u=;fr=;l='Number of Connections';n='22';t='number';))"
for ((i=0; i < 500; i++))
do print -r -- "$data"
done | while read -u$n -C stat
do :
done {n}<&0-
for ((i=0; i < 500; i++))
done