fixed a memory leak bug in parse_expr_basic() in parse.c

touched up qse_sed_comp() a little.
ehnanced the regression test script
This commit is contained in:
2009-09-10 21:05:13 +00:00
parent 417d901dad
commit 07d4a531f8
13 changed files with 125 additions and 84 deletions

View File

@ -242,7 +242,25 @@ leakcheck)
exit 1
}
run_scripts "${bin_valgrind} --leak-check=full --show-reachable=yes --track-fds=yes" 2>&1 > "${OUTFILE}.test"
echo_so "Inspect the '${OUTFILE}.test' file for any memory and file descriptor leaks."
x=`grep -Fic "no leaks are possible" "${OUTFILE}.test"`
y=`grep -Fic "${bin_valgrind}" "${OUTFILE}.test"`
if [ ${x} -eq ${y} ]
then
echo_so "(POSSIBLY) no memory leaks detected".
else
echo_so "(POSSIBLY) some memory leaks detected".
fi
echo_so "Inspect the '${OUTFILE}.test' file for details"
;;
*)
echo_so "USAGE: $0 init"
echo_so " $0 test"
echo_so " $0 leakcheck"
exit 1
;;
esac
exit 0
;;
*)
echo_so "USAGE: $0 init"

View File

@ -1,5 +1,5 @@
--------------------------------------------------------------------------------
../../cmd/sed/.libs/qsesed -n -f 001.sed 001.dat </dev/stdin 2>&1
../../cmd/sed/.libs/qsesed -n -f s001.sed s001.dat </dev/stdin 2>&1
--------------------------------------------------------------------------------
ab...c AAA
@ -15,7 +15,7 @@ pq...r AAA2
kbs ddd
dif cccc
--------------------------------------------------------------------------------
../../cmd/sed/.libs/qsesed -f 002.sed 002.dat </dev/stdin 2>&1
../../cmd/sed/.libs/qsesed -f s002.sed s002.dat </dev/stdin 2>&1
--------------------------------------------------------------------------------
ab...c AAA
@ -31,7 +31,7 @@ pq...r AAA2
kbs ddd
dif cccc
--------------------------------------------------------------------------------
../../cmd/sed/.libs/qsesed -f 003.sed 003.dat </dev/stdin 2>&1
../../cmd/sed/.libs/qsesed -f s003.sed s003.dat </dev/stdin 2>&1
--------------------------------------------------------------------------------
ab...c AAA
@ -47,7 +47,7 @@ pq...r AAA2
kbs ddd
dif cccc
--------------------------------------------------------------------------------
../../cmd/sed/.libs/qsesed -f 004.sed 004.dat </dev/stdin 2>&1
../../cmd/sed/.libs/qsesed -f s004.sed s004.dat </dev/stdin 2>&1
--------------------------------------------------------------------------------
linux {
HOST: com.com

View File

@ -49,10 +49,10 @@ TMPFILE="${TMPFILE:=./regress.temp}"
OUTFILE="${OUTFILE:=./regress.out}"
PROGS="
001.sed/001.dat//-n
002.sed/002.dat//
003.sed/003.dat//
004.sed/004.dat//
s001.sed/s001.dat//-n
s002.sed/s002.dat//
s003.sed/s003.dat//
s004.sed/s004.dat//
"
[ -x "${QSESED}" ] ||
@ -122,7 +122,15 @@ leakcheck)
exit 1
}
run_scripts "${bin_valgrind} --leak-check=full --show-reachable=yes --track-fds=yes" 2>&1 > "${OUTFILE}.test"
echo_so "Inspect the '${OUTFILE}.test' file for any memory and file descriptor leaks."
x=`grep -Fic "no leaks are possible" "${OUTFILE}.test"`
y=`grep -Fic "${bin_valgrind}" "${OUTFILE}.test"`
if [ ${x} -eq ${y} ]
then
echo_so "(POSSIBLY) no memory leaks detected".
else
echo_so "(POSSIBLY) some memory leaks detected".
fi
echo_so "Inspect the '${OUTFILE}.test' file for details"
;;
*)
echo_so "USAGE: $0 init"