]> granicus.if.org Git - procps-ng/commitdiff
library: expand warnings in 'warning-suppression' file
authorJim Warner <james.warner@comcast.net>
Fri, 22 Oct 2021 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Mon, 25 Oct 2021 10:51:18 +0000 (21:51 +1100)
With the addition of more '__thread' attributes in the
previous commit, additional valgrind warnings might be
encountered if developing multi-threaded applications.

So, this patch expands the libproc.supp file which was
originally introduced with the patch referenced below.

Reference(s):
commit be1ddc275623b6cf16060d8a0fa1fb36f677010a

Signed-off-by: Jim Warner <james.warner@comcast.net>
Documentation/libproc.supp

index 346f7cbc58399ae3802a72211047839991420132..3aab400191f824a6d6d00f54c035299b7aec6a64 100644 (file)
@@ -9,25 +9,57 @@
 #
 #  When a sibling thread using this 'procps_pids' API ends, or if some
 #  other thread in that address space calls 'pthread_cancel()' on such
-#  a thread, valgrind may warn that some memory was 'definitely lost'.
+#  a thread, valgrind will warn that some memory is 'definitely lost'.
 #
-#  Any such warnings are dependent on the 'pids_item' enumerators that
+#  The majority of warnings depend on the 'pids_item' enumerators that
 #  have been specified using 'procps_pids_new' or 'procps_pids_reset'.
 #
-#  A single-threaded application should not experience these warnings.
+#  Single-threaded applications will not experience any such warnings.
 #
 
-## for most of the 'definitely lost' warnings,
-## up to 4 blocks ranging from 1024 to 2048 bytes each
+## always present 'definitely lost' warnings
+#  2 blocks of 128k each
 {
-   HEAP_BASED_TLS_file2str
+   HEAP_BASED_TLS_startup
+   Memcheck:Leak
+   ...
+   fun:openproc
+}
+
+## for most of the 'definitely lost' warnings
+#  up to 4 blocks ranging from 1024 to 2048 bytes each
+{
+   HEAP_BASED_TLS_input
    Memcheck:Leak
    ...
    fun:file2str
 }
 
-## for the remaining 'definitely lost' warnings,
-## a block for each active lxc container, 16 bytes + sizeof name
+## additional potential 'definitely lost' warnings
+#  48 bytes for each user
+{
+   HEAP_BASED_TLS_users
+   Memcheck:Leak
+   ...
+   fun:pwcache_get_user
+}
+#  48 bytes for each group
+{
+   HEAP_BASED_TLS_groups
+   Memcheck:Leak
+   ...
+   fun:pwcache_get_group
+}
+#  40 bytes for each tty
+{
+   HEAP_BASED_TLS_terminals
+   Memcheck:Leak
+   ...
+   fun:dev_to_tty
+}
+
+## remaining potential 'definitely lost' warnings
+#  16 bytes + sizeof name for each lxc container
 {
    HEAP_BASED_TLS_lxc
    Memcheck:Leak
@@ -36,7 +68,7 @@
 }
 
 ## in case an installed library has been stripped,
-## this embraces both of the above warning categories
+## this will embrace all of the above warning categories
 {
    HEAP_BASED_TLS_library
    Memcheck:Leak