massif doesn't detect 'definite' leaks?

"Bresalier, Rob (Nokia - US/Murray Hill)" <[email protected]>
Newsgroups gmane.comp.debugging.valgrind
Message-ID <PH0PR08MB6988E2301D267557E962CE56F39E9@PH0PR08MB6988.namprd08.prod.outlook.com>
I tried 'massif' on a simple program shown below where there are "definitely lost" leaks.

massif doesn't seem to find "definitely lost" leaks, is this correct?

I'm tried with both 3.19.0 and 3.15.0 versions of valgrind/massif, same result, "definitely lost" leaks are not found.

I launch massif via:

valgrind --tool=massif --sigill-diagnostics=no --error-limit=no --massif-out-file=definitely.%p.massif definitely.elf

When I use memcheck it does find these definite leaks as below:

==29917== 60 bytes in 3 blocks are definitely lost in loss record 1 of 1
==29917==    at 0x402F67C: malloc (vg_replace_malloc.c:381)
==29917==    by 0x80491D1: f2() (definitely.cpp:11)
==29917==    by 0x804920F: f1() (definitely.cpp:17)
==29917==    by 0x8049262: main (definitely.cpp:25)

But massif doesn't find them at all? Is this correct?

When I use massif on a program with "still reachable" it does find the still reachable, but it isn't finding definite leaks.

Shouldn't massif also find definite leaks?

The C code for "definitely.elf" is below:

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

void*
f2()
{
  return malloc(20);
}

void
f1()
{
  f2();
}

int
main()
{
  for (int i = 1; i <= 3; i++)
  {
    f1();
  }

  return 0;
}

Thanks,
Rob

_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.