blob: 614eda35450ea5b42af71ccf791f77e5254e795f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#!/bin/sh
if [ "$2" = "" ]; then
tocf=test.toc
else
tocf="$2"
fi
valgrind -q --track-origins=yes --error-exitcode=1 --malloc-fill=0xcd --free-fill=0xef --num-callers=100 ./toc $tocf || exit 1
if [ "$1" = "c" ]; then
gcc out.c && ./a.out
elif [ "$1" = "pc" ]; then
cat out.c
fi
rm vgcore* 2> /dev/null
|