Huge logfile and leaks found with Valgrind


I am having the same problem as Valgrind suppression file however I decided to open a new post.

So I am using a virtual machine with Scientific Linux 7 in a MacBook air with OSX 10.11.2, ROOT 6.02/08 and Valgrind 3.10.0.

I am using:

valgrind --tool=memcheck --log-file=log_valgrind --suppressions=$ROOTSYS/etc/valgrind-root.supp ../bin/Interpolate.exe

with and without linking against ROOT, however I am not using any ROOT class so far, therefore I can choose not to link against ROOT if I want to. I got the files I attached, you can see that without ROOT everything is ok. With ROOT I get memory leaks.

Then I try to do the same by using:

valgrind --leak-check=yes --log-file=log_valgrind --suppressions=$ROOTSYS/etc/valgrind-root.supp ../bin/Interpolate.exe

also with and without ROOT, I also attached the files. As you can see with ROOT and with the leak-check=yes option the output is ~10k lines long, without ROOT its really short and without any errors.

In I can see:

[quote]The --leak-check option turns on the detailed memory leak detector.[/quote].

In I also read:

In the same page I read:

[quote]–leak-check=<no|summary|yes|full> [default: summary]
When enabled, search for memory leaks when the client program finishes. If set to summary, it says how many leaks occurred. If set to full or yes, each individual leak will be shown in detail and/or counted as an error, as specified by the options --show-leak-kinds and --errors-for-leak-kinds.[/quote]

However in Valgrind suppression file you say that it’s Valgrind’s issue because your code is well written.

So I am lead to think that:

  1. Those memory leaks are interfering with my (and others) debugging process.

  2. The suppression file is just suppressing the least detailed output, once you include --leak-check=yes (or “full” instead of the default “summary”) we get flooded with thousands of lines originating in ROOT.

Can you comment on this? Is there a way to suppress also the detailed output from what you claim are “false positives”? maybe expanding/modifying the suppression file?

no_root_leakcheck.txt (668 Bytes)
with_root_leakcheck.txt (1.24 MB)
with_root_memcheck.txt (1.29 KB)
no_root_memcheck.txt (1000 Bytes)

Important issue, so bump it to the top of forum :smiley:

I am trying to use valgrind again, this time I am using Debian 8 with ROOT 6.04.16 from ATHENA obtained by:


If I use your suppression file, as explained in: … -positives

I still get all those messages. I followed: … File_Howto

Up to the point where I have to use the gawk script and I get a new file that I attached. I had to split them because you dont allow files larger than 2MB (?). I am using:

#include “TString.h”

int main()
std::cout << “SOme message” << std::endl;

return 0;

To test it with the .valgrindrc file:

--memcheck:leak-check=full --show-reachable=yes --suppressions=/nfs/monet_3/home/campoverde/Test/Test_Valgrind/Test/custom_minimal_1.txt --suppressions=/nfs/monet_3/home/campoverde/Test/Test_Valgrind/Test/custom_minimal_2.txt --suppressions=/nfs/monet_3/home/campoverde/Test/Test_Valgrind/Test/custom_minimal_3.txt

And the command:

valgrind --tool=memcheck ./test.exe

And it works in contrast to what I get by using:


However if I change my test code to:

#include “TString.h”
#include “TH1F.h”

int main()
TH1F h_test(“test”, “”, 100, -10, 10);
h_test.FillRandom(“gaus”, 1000);

return 0;

the errors reappear. It seems that every time I use a different feature of ROOT I get different errors/warnings. And to get this to work one might have to put every feature that one might ever need in a test file and run it to make the suppressions file.
custom_minimal_1.txt (1.47 MB)
custom_minimal_2.txt (1.77 MB)
custom_minimal_3.txt (144 KB)