Skip to content

Instantly share code, notes, and snippets.

@hotsphink
Created August 23, 2019 17:51
Show Gist options
  • Save hotsphink/a38a59cfec262f5561aa3cab6c483fd9 to your computer and use it in GitHub Desktop.
Save hotsphink/a38a59cfec262f5561aa3cab6c483fd9 to your computer and use it in GitHub Desktop.
mkgist-created gist
#!/bin/sh
# Some options from https://developer.mozilla.org/en-US/docs/Mozilla/Testing/Valgrind
LOGFILE=/tmp/vg.$$
export G_SLICE=always-malloc
/usr/bin/valgrind --trace-children=yes --smc-check=all-non-file --vex-iropt-register-updates=allregs-at-mem-access --read-inline-info=yes --num-callers=50 --log-file=$LOGFILE --leak-check=full --fullpath-after=src/ "$@"
cp $LOGFILE vg.log
if grep -e 'ERROR SUMMARY: [^0]' $LOGFILE; then
exit 1
else
exit 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment