Skip to content

Commit 3444b11

Browse files
committed
Fix valgrind check to ignore bash leak
1 parent 0232239 commit 3444b11

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ EXTRA_DIST+= wolfssl-ntru.sln
135135
EXTRA_DIST+= wolfssl.sln
136136
EXTRA_DIST+= wolfssl64.sln
137137
EXTRA_DIST+= valgrind-error.sh
138+
EXTRA_DIST+= valgrind-bash.supp
138139
EXTRA_DIST+= fips-hash.sh
139140
EXTRA_DIST+= gencertbuf.pl
140141
EXTRA_DIST+= README.md

valgrind-bash.supp

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
linux_bash_locale_leak
3+
Memcheck:Leak
4+
fun:malloc
5+
fun:xmalloc
6+
fun:set_default_locale
7+
fun:main
8+
}

valgrind-error.sh

+6-4
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,22 @@
33
#
44
# Our valgrind "error" wrapper.
55

6-
valgrind --leak-check=full -q "$@" 2> valgrind.tmp
6+
TMP="valgrind.tmp.$$"
7+
8+
valgrind --suppressions=valgrind-bash.supp --leak-check=full -q "$@" 2> $TMP
79

810
result="$?"
911

1012
# verify no errors
1113

12-
output="`cat valgrind.tmp`"
14+
output="`cat $TMP`"
1315

1416
if [ "$output" != "" ]; then
15-
cat valgrind.tmp >&2
17+
cat $TMP >&2
1618
result=1
1719
fi
1820

19-
rm valgrind.tmp
21+
rm $TMP
2022

2123
exit $result
2224

0 commit comments

Comments
 (0)