Memory leak via libunbound in FreeBSD11.3

This commit is contained in:
Willem Toorop 2019-12-19 11:29:40 +00:00
parent a78b963aa9
commit 8b2e8c2be3
3 changed files with 33 additions and 29 deletions

View File

@ -0,0 +1,14 @@
NS .
localhost
localhost.
A localhost.
-A getdnsapi.net
qwerlkjhasdfpuiqwyerm.1234kjhrqwersv.com
localhost.
-G TXT bogus.nlnetlabs.nl
-H 8.8.8.8
-H 2a04:b900:0:100::37
-a -A -x www.microsoft.com
-s
-S
-X

View File

@ -0,0 +1,18 @@
{
<bionic_leak_nettle_ecc_point_init>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:__gmp_default_allocate
fun:_nettle_gmp_alloc_limbs
fun:nettle_ecc_point_init
obj:/usr/lib/x86_64-linux-gnu/libunbound.so.2.5.6
}
{
<freebsd113_leak_pthread_attr_init>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:pthread_attr_init
obj:/usr/local/lib/libunbound.so.8.1.5
}

View File

@ -4,36 +4,8 @@
# use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test
cat >queries <<EOT
NS .
localhost
localhost.
A localhost.
-A getdnsapi.net
qwerlkjhasdfpuiqwyerm.1234kjhrqwersv.com
localhost.
-G TXT bogus.nlnetlabs.nl
-H 8.8.8.8
-H 2a04:b900:0:100::37
-a -A -x www.microsoft.com
-s
-S
-X
EOT
cat >125.supp <<EOT
{
<bionic_leak_nettle_ecc_point_init>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:__gmp_default_allocate
fun:_nettle_gmp_alloc_limbs
fun:nettle_ecc_point_init
obj:/usr/lib/x86_64-linux-gnu/libunbound.so.2.5.6
}
EOT
(
if ! valgrind -v --log-file=valgrind.log --suppressions=125.supp --leak-check=full --error-exitcode=1 --track-origins=yes "${GETDNS_QUERY}" -F queries -f "${TPKG_NAME}.ds" +dnssec_return_validation_chain
if ! valgrind -v --log-file=valgrind.log --suppressions="${TPKG_NAME}.supp" --leak-check=full --error-exitcode=1 --track-origins=yes "${GETDNS_QUERY}" -F "${TPKG_NAME}.queries" -f "${TPKG_NAME}.ds" +dnssec_return_validation_chain
then
exit 1
fi