Bug 403802 - leak_cpp_interior fails with some reachable blocks different than expected
Summary: leak_cpp_interior fails with some reachable blocks different than expected
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: 3.4.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-31 15:00 UTC by Josef Weidendorfer
Modified: 2021-11-14 08:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Josef Weidendorfer 2019-01-31 15:00:25 UTC
SUMMARY

Release notes for 3.14 tells that

 373069  memcheck/tests/leak_cpp_interior fails with GCC 5.1+

is fixed, and the root cause seems to be fixed indeed.
However, I still get a failure of this test on a SLES12SP3
x86_64 system using both gcc 4.8.5 and gcc 8.2, with
self-compiled VG 3.14.

STEPS TO REPRODUCE
1. configure && make; make check
3. perl tests/vg_regtest memcheck/tests/leak_cpp_interior

OBSERVED RESULT

leak_cpp_interior: valgrind   --leak-check=summary --leak-check-heuristics=multipleinheritance,stdstring,newarray,length64 --suppressions=libstdc++.supp ./leak_cpp_interior 
*** leak_cpp_interior failed (stderr) ***

== 1 test, 1 stderr failure, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
memcheck/tests/leak_cpp_interior         (stderr)


EXPECTED RESULT

== 1 test, 0 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: SLES12SP3

ADDITIONAL INFORMATION

> cat memcheck/tests/leak_cpp_interior.stderr.diff
--- leak_cpp_interior.stderr.exp        2018-05-05 09:42:22.000000000 +0200
+++ leak_cpp_interior.stderr.out        2019-01-31 15:50:34.993049000 +0100
@@ -9,7 +9,7 @@
    definitely lost: x bytes in 1 blocks
    indirectly lost: 0 bytes in 0 blocks
      possibly lost: 0 bytes in 0 blocks
-   still reachable: x bytes in 8 blocks
+   still reachable: x bytes in 9 blocks
                       of which reachable via heuristic:
                         stdstring          : x bytes in 2 blocks
                         length64           : x bytes in 1 blocks
@@ -23,7 +23,7 @@
    definitely lost: x (+0) bytes in 1 (+0) blocks
    indirectly lost: 0 (+0) bytes in 0 (+0) blocks
      possibly lost: x (+x) bytes in 4 (+4) blocks
-   still reachable: x (-x) bytes in 4 (-4) blocks
+   still reachable: x (-x) bytes in 5 (-4) blocks
                       of which reachable via heuristic:
                         stdstring          : 0 (-x) bytes in 0 (-2) blocks
                         length64           : 0 (-x) bytes in 0 (-1) blocks
@@ -35,10 +35,10 @@
 LEAK SUMMARY:
    definitely lost: x (+0) bytes in 1 (+0) blocks
    indirectly lost: 0 (+0) bytes in 0 (+0) blocks
-     possibly lost: x (-x) bytes in 5 (+1) blocks
-   still reachable: x (+x) bytes in 3 (-1) blocks
+     possibly lost: x (-x) bytes in 4 (+0) blocks
+   still reachable: x (+x) bytes in 5 (+0) blocks
                       of which reachable via heuristic:
-                        newarray           : x (+x) bytes in 1 (+1) blocks
+                        newarray           : x (+x) bytes in 2 (+2) blocks
                         multipleinheritance: 0 (-x) bytes in 0 (-2) blocks
 To see details of leaked memory, give 'full' arg to leak_check

 
 leak_check summary heuristics stdstring
@@ -58,7 +58,7 @@
    definitely lost: x (+0) bytes in 1 (+0) blocks
    indirectly lost: 0 (+0) bytes in 0 (+0) blocks
      possibly lost: x (-x) bytes in 4 (-1) blocks
-   still reachable: x (+x) bytes in 4 (+1) blocks
+   still reachable: x (+x) bytes in 5 (+1) blocks
                       of which reachable via heuristic:
                         stdstring          : x (+x) bytes in 2 (+2) blocks
                         length64           : 0 (-x) bytes in 0 (-1) blocks
@@ -69,7 +69,7 @@
    definitely lost: x (+0) bytes in 1 (+0) blocks
    indirectly lost: 0 (+0) bytes in 0 (+0) blocks
      possibly lost: 0 (-x) bytes in 0 (-4) blocks
-   still reachable: x (+x) bytes in 8 (+4) blocks
+   still reachable: x (+x) bytes in 9 (+4) blocks
                       of which reachable via heuristic:
                         stdstring          : x (+0) bytes in 2 (+0) blocks
                         length64           : x (+x) bytes in 1 (+1) blocks
@@ -82,7 +82,7 @@
    definitely lost: x (+0) bytes in 1 (+0) blocks
    indirectly lost: 0 (+0) bytes in 0 (+0) blocks
      possibly lost: 0 (+0) bytes in 0 (+0) blocks
-   still reachable: x (+0) bytes in 8 (+0) blocks
+   still reachable: x (+0) bytes in 9 (+0) blocks
                       of which reachable via heuristic:
                         stdstring          : x (+0) bytes in 2 (+0) blocks
                         length64           : x (+0) bytes in 1 (+0) blocks
@@ -95,7 +95,7 @@
    definitely lost: x (+0) bytes in 1 (+0) blocks
    indirectly lost: 0 (+0) bytes in 0 (+0) blocks
      possibly lost: x (+x) bytes in 6 (+6) blocks
-   still reachable: x (-x) bytes in 2 (-6) blocks
+   still reachable: x (-x) bytes in 3 (-6) blocks
                       of which reachable via heuristic:
                         stdstring          : 0 (-x) bytes in 0 (-2) blocks
                         length64           : 0 (-x) bytes in 0 (-1) blocks



> ldd memcheck/tests/leak_cpp_interior
  linux-vdso.so.1 (0x00007ffc2b9eb000)
  libstdc++.so.6 => /XXX/compilers/gcc/8.2.0/lib64/libstdc++.so.6 (0x00007fd72729d000)
  libm.so.6 => /lib64/libm.so.6 (0x00007fd726fa0000)
  libgcc_s.so.1 => /XXX/compilers/gcc/8.2.0/lib64/libgcc_s.so.1 (0x00007fd726d88000)
  libc.so.6 => /lib64/libc.so.6 (0x00007fd7269e7000)
  /lib64/ld-linux-x86-64.so.2 (0x00007fd727625000)
Comment 1 Paul Floyd 2021-11-12 23:06:38 UTC
Can anyone check this with git HEAD code?
Comment 2 Paul Floyd 2021-11-14 08:32:58 UTC
As https://bugs.kde.org/show_bug.cgi?id=435732