]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
FreeBSD: add suppressions for still reachable memory when using getaddrinfo
authorPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 12 Dec 2023 16:41:38 +0000 (17:41 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 12 Dec 2023 16:41:38 +0000 (17:41 +0100)
Also add a couple of attributions for my recent memccpy changes.

freebsd.supp
memcheck/tests/memccpy1.c
shared/vg_replace_strmem.c

index 471fbe6fd3d610edf32dd911b8c09f75f0d88d8f..94b3cd9a466f9f22ffaa91a04e9bd4c8f7189eec 100644 (file)
    ...
    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
+}
+
index 9d7ef64821dc3733c7cc2292ae16b0e06954f8d9..91855cf4635c478d0c4f1013c63b546a3e0cede2 100644 (file)
@@ -1,3 +1,4 @@
+// Example copied from https://en.cppreference.com/w/c/string/byte/memccpy
 #include <ctype.h>
 #include <stdio.h>
 #include <string.h>
index 623a8b7b4aae44f5521e0a60d49c34fccb388865..781dd784bfe6588ffb4e8401ba9161fa1fc16e1d 100644 (file)
@@ -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 ); \