diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/valgrind.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/valgrind.sh b/scripts/valgrind.sh new file mode 100755 index 0000000..db05a1d --- /dev/null +++ b/scripts/valgrind.sh @@ -0,0 +1,18 @@ +#!/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 + +exec valgrind -q \ + --error-exitcode=10 \ + --leak-check=full \ + --show-leak-kinds=all \ + --track-origins=yes \ + --track-fds=yes \ + --trace-children=yes \ + "$@" |