Fix valgrind check to ignore bash leak

pull/3209/head
Sean Parkinson 2020-08-10 13:15:20 +10:00
parent 0232239959
commit 3444b115ba
3 changed files with 15 additions and 4 deletions

View File

@ -135,6 +135,7 @@ EXTRA_DIST+= wolfssl-ntru.sln
EXTRA_DIST+= wolfssl.sln
EXTRA_DIST+= wolfssl64.sln
EXTRA_DIST+= valgrind-error.sh
EXTRA_DIST+= valgrind-bash.supp
EXTRA_DIST+= fips-hash.sh
EXTRA_DIST+= gencertbuf.pl
EXTRA_DIST+= README.md

View File

@ -0,0 +1,8 @@
{
linux_bash_locale_leak
Memcheck:Leak
fun:malloc
fun:xmalloc
fun:set_default_locale
fun:main
}

View File

@ -3,20 +3,22 @@
#
# Our valgrind "error" wrapper.
valgrind --leak-check=full -q "$@" 2> valgrind.tmp
TMP="valgrind.tmp.$$"
valgrind --suppressions=valgrind-bash.supp --leak-check=full -q "$@" 2> $TMP
result="$?"
# verify no errors
output="`cat valgrind.tmp`"
output="`cat $TMP`"
if [ "$output" != "" ]; then
cat valgrind.tmp >&2
cat $TMP >&2
result=1
fi
rm valgrind.tmp
rm $TMP
exit $result