]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
More memcheck/tests/libstdc++.supp suppressions
authorMark Wielaard <mark@klomp.org>
Tue, 9 Apr 2019 14:09:50 +0000 (16:09 +0200)
committerMark Wielaard <mark@klomp.org>
Wed, 10 Apr 2019 15:04:02 +0000 (17:04 +0200)
memcheck/tests/leak_cpp_interior might fail because depending on compiler
and arch used the suppression file used doesn't catch some allocations
through the DT_INIT_ARRAY functions.

That memory doesn't actually leak, it gets freed by the
__gnu_cxx::__freeres hook. But since this testcase shows leaks while
running, not after the program ends, it needs to suppress these allocations.

https://bugs.kde.org/show_bug.cgi?id=406360

NEWS
memcheck/tests/libstdc++.supp

diff --git a/NEWS b/NEWS
index 6f991836ce1f62ef854002637e8cc905b61f3843..2cc8d2013a7434cdfc7713f44672342931d91a30 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -147,6 +147,7 @@ where XXXXXX is the bug number as listed below.
 406198  none/tests/ppc64/test_isa_3_0_other test sporadically including CA
         bit in output.
 406352  cachegrind/callgrind fails ann tests because of missing a.c
+406360  memcheck/tests/libstdc++.supp needs more supression variants
 
 n-i-bz  add syswrap for PTRACE_GET|SET_THREAD_AREA on amd64.
 n-i-bz  Fix callgrind_annotate non deterministic order for equal total
index fad537f79f3d8a416beee5b2f9d85c035a023888..28ab182d1263c36d2d5040f602e64d36deb94ad1 100644 (file)
@@ -49,6 +49,9 @@
 #    still reachable: 72,704 bytes in 1 blocks
 #         suppressed: 0 bytes in 0 blocks
 
+# All the following suppressions are variants of
+# _dl_init -> call_init which calls the DT_INIT_ARRAY functions
+
 {
    malloc-leaks-cxx-stl-string-classes
    Memcheck:Leak
    fun:_dl_init
    obj:*lib*/ld-2.*.so
 }
+{
+   malloc-leaks-cxx-stl-string-classes-2
+   Memcheck:Leak
+   match-leak-kinds: reachable
+   fun:malloc
+   obj:*lib*/libstdc++.so*
+   fun:call_init.part.0
+   fun:_dl_init
+   obj:*lib*/ld-2.*.so
+}
 {
   malloc-leaks-cxx-stl-string-classes-debug
   Memcheck:Leak
   fun:_dl_init
   obj:*lib*/ld-2.*.so
 }
+{
+   malloc-leaks-cxx-stl-string-classes-debug2
+   Memcheck:Leak
+   match-leak-kinds: reachable
+   fun:malloc
+   obj:*
+   fun:call_init
+   fun:_dl_init
+   fun:_dl_start_user
+}