aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/valgrind.sh
blob: 806d05e7464ba71c51d97efab6f3eead988fa704 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/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 \
    --leak-check=full \
    --show-leak-kinds=all \
    --track-origins=yes \
    --track-fds=yes \
    --trace-children=yes \
    -- "$@"