From: Paul Floyd Date: Tue, 12 Dec 2023 16:41:38 +0000 (+0100) Subject: FreeBSD: add suppressions for still reachable memory when using getaddrinfo X-Git-Tag: VALGRIND_3_23_0~227 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b71a92139b701a64409abfe7e06e939c0af9a63;p=thirdparty%2Fvalgrind.git FreeBSD: add suppressions for still reachable memory when using getaddrinfo Also add a couple of attributions for my recent memccpy changes. --- diff --git a/freebsd.supp b/freebsd.supp index 471fbe6fd3..94b3cd9a46 100644 --- a/freebsd.supp +++ b/freebsd.supp @@ -61,3 +61,26 @@ ... fun:newlocale } +# when calling getaddrinfo +{ + MEMCHECK-LIBC-REACHABLE-4 + Memcheck:Leak + match-leak-kinds: reachable + fun:*alloc + fun:_nsyyparse +} +{ + MEMCHECK-LIBC-REACHABLE-5 + Memcheck:Leak + match-leak-kinds: reachable + fun:malloc + fun:_nsyylex +} +{ + MEMCHECK-LIBC-REACHABLE-6 + Memcheck:Leak + match-leak-kinds: reachable + fun:malloc + fun:__res_vinit +} + diff --git a/memcheck/tests/memccpy1.c b/memcheck/tests/memccpy1.c index 9d7ef64821..91855cf463 100644 --- a/memcheck/tests/memccpy1.c +++ b/memcheck/tests/memccpy1.c @@ -1,3 +1,4 @@ +// Example copied from https://en.cppreference.com/w/c/string/byte/memccpy #include #include #include diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c index 623a8b7b4a..781dd784bf 100644 --- a/shared/vg_replace_strmem.c +++ b/shared/vg_replace_strmem.c @@ -2349,7 +2349,7 @@ static inline void my_exit ( int x ) /*---------------------- memccpy ----------------------*/ - /* memccpy */ + /* memccpy, mostly based on GNU libc source */ #define MEMCCPY(soname, fnname) \ void* VG_REPLACE_FUNCTION_EZU(20490,soname,fnname) \ ( void *dst, const void *src, Int c, SizeT len ); \