- new client requests
VALGRIND_DISABLE_ADDR_ERROR_REPORTING_IN_RANGE and
VALGRIND_ENABLE_ADDR_ERROR_REPORTING_IN_RANGE
+ - new leak check heuristic 'length64' to detect interior pointers
+ pointing at offset 64bit of a block, when the first 8 bytes contains
+ the block size - 8. This is e.g. used by sqlite3MemMalloc.
* Helgrind:
- Helgrind GDB server monitor command 'info locks' giving
336957 Add a section about the Solaris/illumos port on the webpage
337094 ifunc wrapper is broken on ppc64
337285 fcntl commands F_OFD_SETLK, F_OFD_SETLKW, and F_OFD_GETLK not supported
+337528 leak check heuristic for block prefixed by length as 64bit number
n-i-bz Fix KVM_CREATE_IRQCHIP ioctl handling
n-i-bz s390x: Fix memory corruption for multithreaded applications
n-i-bz vex arm->IR: allow PC as basereg in some LDRD cases
[unlimited*|limited <max_loss_records_output>]
* = defaults
where kind is one of definite indirect possible reachable all none
- where heur is one of stdstring newarray multipleinheritance all none*
+ where heur is one of stdstring length64 newarray
+ multipleinheritance all none*
Examples: leak_check
leak_check summary any
leak_check full kinds indirect,possible
[unlimited*|limited <max_loss_records_output>]
* = defaults
where kind is one of definite indirect possible reachable all none
- where heur is one of stdstring newarray multipleinheritance all none*
+ where heur is one of stdstring length64 newarray
+ multipleinheritance all none*
Examples: leak_check
leak_check summary any
leak_check full kinds indirect,possible
a coincidence.</para>
</listitem>
+ <listitem>
+ <para>It might be a pointer to the inner char array of a C++
+ <computeroutput>std::string</computeroutput>. For example, some
+ compilers add 3 words at the beginning of the std::string to
+ store the length, the capacity and a reference count before the
+ memory containing the array of characters. They return a pointer
+ just after these 3 words, pointing at the char array.</para>
+ </listitem>
+
+ <listitem>
+ <para>Some code might allocate a block of memory, and use the first 8
+ bytes to store (block size - 8) as a 64bit number.
+ <computeroutput>sqlite3MemMalloc</computeroutput> does this.</para>
+ </listitem>
+
<listitem>
<para>It might be a pointer to an array of C++ objects (which possess
destructors) allocated with <computeroutput>new[]</computeroutput>. In
page</ulink> for more information.</para>
</listitem>
- <listitem>
- <para>It might be a pointer to the inner char array of a C++
- <computeroutput>std::string</computeroutput>. For example, some
- compilers add 3 words at the beginning of the std::string to
- store the length, the capacity and a reference count before the
- memory containing the array of characters. They return a pointer
- just after these 3 words, pointing at the char array.</para>
- </listitem>
-
<listitem>
<para>It might be a pointer to an inner part of a C++ object using
multiple inheritance. </para>
<para>You can optionally activate heuristics to use during the leak
search to detect the interior pointers corresponding to
-the <computeroutput>newarray</computeroutput>,
-<computeroutput>stdstring</computeroutput> and
-<computeroutput>multipleinheritance</computeroutput> cases. If the
+the <computeroutput>stdstring</computeroutput>,
+<computeroutput>length64</computeroutput>,
+<computeroutput>newarray</computeroutput>
+and <computeroutput>multipleinheritance</computeroutput> cases. If the
heuristic detects that an interior pointer corresponds to such a case,
the block will be considered as reachable by the interior
pointer. In other words, the interior pointer will be treated
<para>If heuristics have been used to consider some blocks as
reachable, the leak summary details the heuristically reachable subset
-of 'still reachable:' per heuristic. In the below example, of the 79
-bytes still reachable, 71 bytes (56+7+8) have been considered
+of 'still reachable:' per heuristic. In the below example, of the 95
+bytes still reachable, 87 bytes (56+7+8+16) have been considered
heuristically reachable.
</para>
definitely lost: 4 bytes in 1 blocks
indirectly lost: 0 bytes in 0 blocks
possibly lost: 0 bytes in 0 blocks
- still reachable: 79 bytes in 5 blocks
+ still reachable: 95 bytes in 6 blocks
of which reachable via heuristic:
stdstring : 56 bytes in 2 blocks
+ length64 : 16 bytes in 1 blocks
newarray : 7 bytes in 1 blocks
multipleinheritance: 8 bytes in 1 blocks
suppressed: 0 bytes in 0 blocks
<itemizedlist>
<listitem><para>a comma separated list of one or more of
- <option>stdstring newarray multipleinheritance</option>.</para>
+ <option>stdstring length64 newarray multipleinheritance</option>.</para>
</listitem>
<listitem><para><option>all</option> to activate the complete set of
heuristics.
It is equivalent to
- <option>--leak-check-heuristics=stdstring,newarray,multipleinheritance</option>.</para>
+ <option>--leak-check-heuristics=stdstring,length64,newarray,multipleinheritance</option>.</para>
</listitem>
<listitem><para><option>none</option> for the empty set.</para>
LchStdString =1,
// Consider interior pointer pointing at the array of char in a
// std::string as reachable.
- LchNewArray =2,
+ LchLength64 =2,
+ // Consider interior pointer pointing at offset 64bit of a block as
+ // reachable, when the first 8 bytes contains the block size - 8.
+ // Such length+interior pointers are used by e.g. sqlite3MemMalloc.
+ // On 64bit platforms LchNewArray will also match these blocks.
+ LchNewArray =3,
// Consider interior pointer pointing at second word of a new[] array as
// reachable. Such interior pointers are used for arrays whose elements
// have a destructor.
- LchMultipleInheritance =3,
+ LchMultipleInheritance =4,
// Conside interior pointer pointing just after what looks a vtable
// as reachable.
}
LeakCheckHeuristic;
// Nr of heuristics, including the LchNone heuristic.
-#define N_LEAK_CHECK_HEURISTICS 4
+#define N_LEAK_CHECK_HEURISTICS 5
// Build mask to check or set Heuristic h membership
#define H2S(h) (1 << (h))
#define HiS(h,s) ((s) & R2S(h))
// A set with all Heuristics:
#define HallS \
- (H2S(LchStdString) | H2S(LchNewArray) | H2S(LchMultipleInheritance))
+ (H2S(LchStdString) | H2S(LchLength64) | H2S(LchNewArray) | \
+ H2S(LchMultipleInheritance))
/* Heuristics set to use for the leak search.
Default : no heuristic. */
switch(h) {
case LchNone: return "none";
case LchStdString: return "stdstring";
+ case LchLength64: return "length64";
case LchNewArray: return "newarray";
case LchMultipleInheritance: return "multipleinheritance";
default: return "???invalid heuristic???";
return False;
}
+// true if a is properly aligned and points to 64bits of valid memory
+static Bool is_valid_aligned_ULong ( Addr a )
+{
+ if (sizeof(Word) == 8)
+ return MC_(is_valid_aligned_word)(a);
+
+ return MC_(is_valid_aligned_word)(a)
+ && MC_(is_valid_aligned_word)(a + 4);
+}
+
// If ch is heuristically reachable via an heuristic member of heur_set,
// returns this heuristic.
// If ch cannot be considered reachable using one of these heuristics,
}
}
+ if (HiS(LchLength64, heur_set)) {
+ // Detects inner pointers that point at 64bit offset (8 bytes) into a
+ // block following the length of the remaining as 64bit number
+ // (=total block size - 8).
+ // This is used e.g. by sqlite for tracking the total size of allocated
+ // memory.
+ // Note that on 64bit platforms, a block matching LchLength64 will
+ // also be matched by LchNewArray.
+ if ( ptr == ch->data + sizeof(ULong)
+ && is_valid_aligned_ULong(ch->data)) {
+ const ULong size = *((ULong*)ch->data);
+ if (size > 0 && (ch->szB - sizeof(ULong)) == size) {
+ return LchLength64;
+ }
+ }
+ }
+
if (HiS(LchNewArray, heur_set)) {
// Detects inner pointers at second word of new[] array, following
// a plausible nr of elements.
MC_(pp_describe_addr) (ptr);
if (lc_is_a_chunk_ptr(addr, &ch_no, &ch, &ex) ) {
Int h;
- for (h = LchStdString; h <= LchMultipleInheritance; h++) {
+ for (h = LchStdString; h < N_LEAK_CHECK_HEURISTICS; h++) {
if (heuristic_reachedness(addr, ch, ex, H2S(h)) == h) {
VG_(umsg)("block at %#lx considered reachable "
"by ptr %#lx using %s heuristic\n",
static Bool MC_(parse_leak_heuristics) ( const HChar *str0, UInt *lhs )
{
- return VG_(parse_enum_set) ("-,stdstring,newarray,multipleinheritance",
- str0, lhs);
+ return
+ VG_(parse_enum_set) ("-,stdstring,length64,newarray,multipleinheritance",
+ str0, lhs);
}
" where kind is one of definite indirect possible reachable all none\n"
" --leak-check-heuristics=heur1,heur2,... which heuristics to use for\n"
" improving leak search false positive [none]\n"
-" where heur is one of stdstring newarray multipleinheritance all none\n"
+" where heur is one of stdstring length64 newarray\n"
+" multipleinheritance all none\n"
" --show-reachable=yes same as --show-leak-kinds=all\n"
" --show-reachable=no --show-possibly-lost=yes\n"
" same as --show-leak-kinds=definite,possible\n"
" [unlimited*|limited <max_loss_records_output>]\n"
" * = defaults\n"
" where kind is one of definite indirect possible reachable all none\n"
-" where heur is one of stdstring newarray multipleinheritance all none*\n"
+" where heur is one of stdstring length64 newarray\n"
+" multipleinheritance all none*\n"
" Examples: leak_check\n"
" leak_check summary any\n"
" leak_check full kinds indirect,possible\n"
#include <stdio.h>
#include <unistd.h>
+#include <stdint.h>
+#include <stdlib.h>
#include <string>
#include <sstream>
#include "../memcheck.h"
class MyClass
{
+ char m1;
+ int m2;
public:
~MyClass()
{ fprintf(stderr, "destruct MyClass\n");
}
};
+void* wrap64_malloc(int size)
+{
+ uint64_t *p = (uint64_t*)malloc(size + 8);
+ *p = size;
+ ++p;
+ return p;
+}
+
+void wrap64_free(void *p)
+{
+ uint64_t *p2 = (uint64_t*)p;
+ if (p2 == NULL)
+ return;
+ --p2;
+ free(p2);
+}
+
std::string str;
std::string str2;
MyClass *ptr;
Ae *ptrACe;
B *ptrBC;
A *ptrAC;
+void* ptr64;
char who_points_at_cmd[100];
str = "Valgrind"; // interior ptr.
str2 = str;
ptr = new MyClass[3]; // interior ptr.
+ ptr64 = wrap64_malloc(23);
// prepare the who_points_at cmd we will run.
// Do it here to avoid having ptr or its exterior ptr kept in a register.
(void) VALGRIND_MONITOR_COMMAND("leak_check summary heuristics multipleinheritance");
fprintf(stderr, "leak_check summary any heuristics newarray\n");
(void) VALGRIND_MONITOR_COMMAND("leak_check summary heuristics newarray");
+ fprintf(stderr, "leak_check summary heuristics length64\n");
+ (void) VALGRIND_MONITOR_COMMAND("leak_check summary heuristics length64");
fprintf(stderr, "leak_check summary heuristics stdstring\n");
(void) VALGRIND_MONITOR_COMMAND("leak_check summary heuristics stdstring");
+ // check all and none
+ fprintf(stderr, "leak_check summary heuristics multipleinheritance,newarray,stdstring,length64\n");
+ (void) VALGRIND_MONITOR_COMMAND("leak_check summary heuristics multipleinheritance,newarray,stdstring,length64");
+ fprintf(stderr, "leak_check summary heuristics all\n");
+ (void) VALGRIND_MONITOR_COMMAND("leak_check summary heuristics all");
+ fprintf(stderr, "leak_check summary heuristics none\n");
+ (void) VALGRIND_MONITOR_COMMAND("leak_check summary heuristics none");
+
// Test the who_points_at when the block is pointed to with an interior ptr.
(void) VALGRIND_MONITOR_COMMAND(who_points_at_cmd);
delete ptrACe;
delete ptrBC;
delete ptrAC;
+ wrap64_free(ptr64);
fprintf(stderr, "Finished!\n");
return 0;
}
valgrind output will go to log
VALGRIND_DO_LEAK_CHECK
4 bytes in 1 blocks are definitely lost in loss record ... of ...
- by 0x........: doit() (leak_cpp_interior.cpp:89)
- by 0x........: main (leak_cpp_interior.cpp:104)
+ by 0x........: doit() (leak_cpp_interior.cpp:112)
+ by 0x........: main (leak_cpp_interior.cpp:127)
LEAK SUMMARY:
definitely lost: 4 bytes in 1 blocks
indirectly lost: 0 bytes in 0 blocks
possibly lost: 0 bytes in 0 blocks
- still reachable: 111 bytes in 7 blocks
+ still reachable: 163 bytes in 8 blocks
of which reachable via heuristic:
stdstring : 56 bytes in 2 blocks
- newarray : 7 bytes in 1 blocks
+ length64 : 31 bytes in 1 blocks
+ newarray : 28 bytes in 1 blocks
multipleinheritance: 24 bytes in 2 blocks
suppressed: 0 bytes in 0 blocks
Reachable blocks (those to which a pointer was found) are not shown.
LEAK SUMMARY:
definitely lost: 4 (+0) bytes in 1 (+0) blocks
indirectly lost: 0 (+0) bytes in 0 (+0) blocks
- possibly lost: 63 (+63) bytes in 3 (+3) blocks
- still reachable: 48 (-63) bytes in 4 (-3) blocks
+ possibly lost: 115 (+115) bytes in 4 (+4) blocks
+ still reachable: 48 (-115) bytes in 4 (-4) blocks
of which reachable via heuristic:
stdstring : 0 (-56) bytes in 0 (-2) blocks
- newarray : 0 (-7) bytes in 0 (-1) blocks
+ length64 : 0 (-31) bytes in 0 (-1) blocks
+ newarray : 0 (-28) bytes in 0 (-1) blocks
multipleinheritance: 24 (+0) bytes in 2 (+0) blocks
suppressed: 0 (+0) bytes in 0 (+0) blocks
To see details of leaked memory, give 'full' arg to leak_check
LEAK SUMMARY:
definitely lost: 4 (+0) bytes in 1 (+0) blocks
indirectly lost: 0 (+0) bytes in 0 (+0) blocks
- possibly lost: 80 (+17) bytes in 4 (+1) blocks
- still reachable: 31 (-17) bytes in 3 (-1) blocks
+ possibly lost: 111 (-4) bytes in 5 (+1) blocks
+ still reachable: 52 (+4) bytes in 3 (-1) blocks
of which reachable via heuristic:
- newarray : 7 (+7) bytes in 1 (+1) blocks
+ newarray : 28 (+28) bytes in 1 (+1) blocks
multipleinheritance: 0 (-24) bytes in 0 (-2) blocks
suppressed: 0 (+0) bytes in 0 (+0) blocks
To see details of leaked memory, give 'full' arg to leak_check
+leak_check summary heuristics length64
+LEAK SUMMARY:
+ definitely lost: 4 (+0) bytes in 1 (+0) blocks
+ indirectly lost: 0 (+0) bytes in 0 (+0) blocks
+ possibly lost: 108 (-3) bytes in 5 (+0) blocks
+ still reachable: 55 (+3) bytes in 3 (+0) blocks
+ of which reachable via heuristic:
+ length64 : 31 (+31) bytes in 1 (+1) blocks
+ newarray : 0 (-28) bytes in 0 (-1) blocks
+ suppressed: 0 (+0) bytes in 0 (+0) blocks
+To see details of leaked memory, give 'full' arg to leak_check
+
leak_check summary heuristics stdstring
LEAK SUMMARY:
definitely lost: 4 (+0) bytes in 1 (+0) blocks
indirectly lost: 0 (+0) bytes in 0 (+0) blocks
- possibly lost: 31 (-49) bytes in 3 (-1) blocks
- still reachable: 80 (+49) bytes in 4 (+1) blocks
+ possibly lost: 83 (-25) bytes in 4 (-1) blocks
+ still reachable: 80 (+25) bytes in 4 (+1) blocks
of which reachable via heuristic:
stdstring : 56 (+56) bytes in 2 (+2) blocks
- newarray : 0 (-7) bytes in 0 (-1) blocks
+ length64 : 0 (-31) bytes in 0 (-1) blocks
+ suppressed: 0 (+0) bytes in 0 (+0) blocks
+To see details of leaked memory, give 'full' arg to leak_check
+
+leak_check summary heuristics multipleinheritance,newarray,stdstring,length64
+LEAK SUMMARY:
+ definitely lost: 4 (+0) bytes in 1 (+0) blocks
+ indirectly lost: 0 (+0) bytes in 0 (+0) blocks
+ possibly lost: 0 (-83) bytes in 0 (-4) blocks
+ still reachable: 163 (+83) bytes in 8 (+4) blocks
+ of which reachable via heuristic:
+ stdstring : 56 (+0) bytes in 2 (+0) blocks
+ length64 : 31 (+31) bytes in 1 (+1) blocks
+ newarray : 28 (+28) bytes in 1 (+1) blocks
+ multipleinheritance: 24 (+24) bytes in 2 (+2) blocks
+ suppressed: 0 (+0) bytes in 0 (+0) blocks
+To see details of leaked memory, give 'full' arg to leak_check
+
+leak_check summary heuristics all
+LEAK SUMMARY:
+ definitely lost: 4 (+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: 163 (+0) bytes in 8 (+0) blocks
+ of which reachable via heuristic:
+ stdstring : 56 (+0) bytes in 2 (+0) blocks
+ length64 : 31 (+0) bytes in 1 (+0) blocks
+ newarray : 28 (+0) bytes in 1 (+0) blocks
+ multipleinheritance: 24 (+0) bytes in 2 (+0) blocks
+ suppressed: 0 (+0) bytes in 0 (+0) blocks
+To see details of leaked memory, give 'full' arg to leak_check
+
+leak_check summary heuristics none
+LEAK SUMMARY:
+ definitely lost: 4 (+0) bytes in 1 (+0) blocks
+ indirectly lost: 0 (+0) bytes in 0 (+0) blocks
+ possibly lost: 139 (+139) bytes in 6 (+6) blocks
+ still reachable: 24 (-139) bytes in 2 (-6) blocks
+ of which reachable via heuristic:
+ stdstring : 0 (-56) bytes in 0 (-2) blocks
+ length64 : 0 (-31) bytes in 0 (-1) blocks
+ newarray : 0 (-28) bytes in 0 (-1) blocks
+ multipleinheritance: 0 (-24) bytes in 0 (-2) blocks
suppressed: 0 (+0) bytes in 0 (+0) blocks
To see details of leaked memory, give 'full' arg to leak_check
HEAP SUMMARY:
in use at exit: 0 bytes in 0 blocks
- total heap usage: 8 allocs, 8 frees, 115 bytes allocated
+ total heap usage: 9 allocs, 9 frees, 167 bytes allocated
All heap blocks were freed -- no leaks are possible
valgrind output will go to log
VALGRIND_DO_LEAK_CHECK
8 bytes in 1 blocks are definitely lost in loss record ... of ...
- by 0x........: doit() (leak_cpp_interior.cpp:89)
- by 0x........: main (leak_cpp_interior.cpp:104)
+ by 0x........: doit() (leak_cpp_interior.cpp:112)
+ by 0x........: main (leak_cpp_interior.cpp:127)
LEAK SUMMARY:
definitely lost: 8 bytes in 1 blocks
indirectly lost: 0 bytes in 0 blocks
possibly lost: 0 bytes in 0 blocks
- still reachable: 187 bytes in 7 blocks
+ still reachable: 239 bytes in 8 blocks
of which reachable via heuristic:
stdstring : 80 bytes in 2 blocks
- newarray : 11 bytes in 1 blocks
+ length64 : 31 bytes in 1 blocks
+ newarray : 32 bytes in 1 blocks
multipleinheritance: 48 bytes in 2 blocks
suppressed: 0 bytes in 0 blocks
Reachable blocks (those to which a pointer was found) are not shown.
LEAK SUMMARY:
definitely lost: 8 (+0) bytes in 1 (+0) blocks
indirectly lost: 0 (+0) bytes in 0 (+0) blocks
- possibly lost: 91 (+91) bytes in 3 (+3) blocks
- still reachable: 96 (-91) bytes in 4 (-3) blocks
+ possibly lost: 143 (+143) bytes in 4 (+4) blocks
+ still reachable: 96 (-143) bytes in 4 (-4) blocks
of which reachable via heuristic:
stdstring : 0 (-80) bytes in 0 (-2) blocks
- newarray : 0 (-11) bytes in 0 (-1) blocks
+ length64 : 0 (-31) bytes in 0 (-1) blocks
+ newarray : 0 (-32) bytes in 0 (-1) blocks
multipleinheritance: 48 (+0) bytes in 2 (+0) blocks
suppressed: 0 (+0) bytes in 0 (+0) blocks
To see details of leaked memory, give 'full' arg to leak_check
LEAK SUMMARY:
definitely lost: 8 (+0) bytes in 1 (+0) blocks
indirectly lost: 0 (+0) bytes in 0 (+0) blocks
- possibly lost: 128 (+37) bytes in 4 (+1) blocks
- still reachable: 59 (-37) bytes in 3 (-1) blocks
+ possibly lost: 128 (-15) bytes in 4 (+0) blocks
+ still reachable: 111 (+15) bytes in 4 (+0) blocks
of which reachable via heuristic:
- newarray : 11 (+11) bytes in 1 (+1) blocks
+ newarray : 63 (+63) bytes in 2 (+2) blocks
multipleinheritance: 0 (-48) bytes in 0 (-2) blocks
suppressed: 0 (+0) bytes in 0 (+0) blocks
To see details of leaked memory, give 'full' arg to leak_check
+leak_check summary heuristics length64
+LEAK SUMMARY:
+ definitely lost: 8 (+0) bytes in 1 (+0) blocks
+ indirectly lost: 0 (+0) bytes in 0 (+0) blocks
+ possibly lost: 160 (+32) bytes in 5 (+1) blocks
+ still reachable: 79 (-32) bytes in 3 (-1) blocks
+ of which reachable via heuristic:
+ length64 : 31 (+31) bytes in 1 (+1) blocks
+ newarray : 0 (-63) bytes in 0 (-2) blocks
+ suppressed: 0 (+0) bytes in 0 (+0) blocks
+To see details of leaked memory, give 'full' arg to leak_check
+
leak_check summary heuristics stdstring
LEAK SUMMARY:
definitely lost: 8 (+0) bytes in 1 (+0) blocks
indirectly lost: 0 (+0) bytes in 0 (+0) blocks
- possibly lost: 59 (-69) bytes in 3 (-1) blocks
- still reachable: 128 (+69) bytes in 4 (+1) blocks
+ possibly lost: 111 (-49) bytes in 4 (-1) blocks
+ still reachable: 128 (+49) bytes in 4 (+1) blocks
of which reachable via heuristic:
stdstring : 80 (+80) bytes in 2 (+2) blocks
- newarray : 0 (-11) bytes in 0 (-1) blocks
+ length64 : 0 (-31) bytes in 0 (-1) blocks
+ suppressed: 0 (+0) bytes in 0 (+0) blocks
+To see details of leaked memory, give 'full' arg to leak_check
+
+leak_check summary heuristics multipleinheritance,newarray,stdstring,length64
+LEAK SUMMARY:
+ definitely lost: 8 (+0) bytes in 1 (+0) blocks
+ indirectly lost: 0 (+0) bytes in 0 (+0) blocks
+ possibly lost: 0 (-111) bytes in 0 (-4) blocks
+ still reachable: 239 (+111) bytes in 8 (+4) blocks
+ of which reachable via heuristic:
+ stdstring : 80 (+0) bytes in 2 (+0) blocks
+ length64 : 31 (+31) bytes in 1 (+1) blocks
+ newarray : 32 (+32) bytes in 1 (+1) blocks
+ multipleinheritance: 48 (+48) bytes in 2 (+2) blocks
+ suppressed: 0 (+0) bytes in 0 (+0) blocks
+To see details of leaked memory, give 'full' arg to leak_check
+
+leak_check summary heuristics all
+LEAK SUMMARY:
+ definitely lost: 8 (+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: 239 (+0) bytes in 8 (+0) blocks
+ of which reachable via heuristic:
+ stdstring : 80 (+0) bytes in 2 (+0) blocks
+ length64 : 31 (+0) bytes in 1 (+0) blocks
+ newarray : 32 (+0) bytes in 1 (+0) blocks
+ multipleinheritance: 48 (+0) bytes in 2 (+0) blocks
+ suppressed: 0 (+0) bytes in 0 (+0) blocks
+To see details of leaked memory, give 'full' arg to leak_check
+
+leak_check summary heuristics none
+LEAK SUMMARY:
+ definitely lost: 8 (+0) bytes in 1 (+0) blocks
+ indirectly lost: 0 (+0) bytes in 0 (+0) blocks
+ possibly lost: 191 (+191) bytes in 6 (+6) blocks
+ still reachable: 48 (-191) bytes in 2 (-6) blocks
+ of which reachable via heuristic:
+ stdstring : 0 (-80) bytes in 0 (-2) blocks
+ length64 : 0 (-31) bytes in 0 (-1) blocks
+ newarray : 0 (-32) bytes in 0 (-1) blocks
+ multipleinheritance: 0 (-48) bytes in 0 (-2) blocks
suppressed: 0 (+0) bytes in 0 (+0) blocks
To see details of leaked memory, give 'full' arg to leak_check
HEAP SUMMARY:
in use at exit: 0 bytes in 0 blocks
- total heap usage: 8 allocs, 8 frees, 195 bytes allocated
+ total heap usage: 9 allocs, 9 frees, 247 bytes allocated
All heap blocks were freed -- no leaks are possible
prog: leak_cpp_interior
-vgopts: --leak-check=summary --leak-check-heuristics=multipleinheritance,stdstring,newarray
+vgopts: --leak-check=summary --leak-check-heuristics=multipleinheritance,stdstring,newarray,length64