aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/valgrind.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsrc/valgrind.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/valgrind.sh b/src/valgrind.sh
new file mode 100755
index 0000000..7223092
--- /dev/null
+++ b/src/valgrind.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+set -o errexit -o nounset -o pipefail
+shopt -s inherit_errexit lastpipe
+
+if ! command -v valgrind &> /dev/null; then
+ echo 'Please make sure valgrind is available.' >&2
+ exit 1
+fi
+
+valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose "$@"