summaryrefslogtreecommitdiff
path: root/runv
blob: b40ca559929fa9191420da396514142e0376ac48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
if [ "$2" = "" ]; then
	tocf=test.toc
else
	tocf="$2"
fi
if [ "$1" = "noq" ]; then
	FLAGS="--leak-check=full"
else
	FLAGS="-q"
fi

valgrind $FLAGS --track-origins=yes --exit-on-first-error=yes --error-exitcode=1 --malloc-fill=0xcd  --free-fill=0xef --num-callers=100 ./toc $tocf || exit 1
if [ "$1" = "c" ]; then
	./test
elif [ "$1" = "pc" ]; then
	cat test.c
fi
rm vgcore* 2> /dev/null