blob: 679c387ba59fab9698f886f27c27ba0c80101a60 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/usr/bin/env bash
# --errors-for-leak-kinds= drop possible due to Solaris libc/_findbuf
valgrind \
--leak-check=full \
--track-fds=yes \
--malloc-fill=0xdb \
--free-fill=0xbd \
--log-file=q-valgrind.log \
--errors-for-leak-kinds=definite \
--error-exitcode=234 \
"${@}"
ret=$?
if [[ ${ret} == 234 ]] ; then
mv q-valgrind.log q-valgrind.$$.log
echo "valgrind log can be found at ${PWD}/q-valgrind.$$.log" > /dev/stderr
else
rm q-valgrind.log
fi
exit ${ret}
|