Valgrind errors for rootcint ported code to g++

I have some analysis code for ROOT, but I’m compiling it with g++ via rootcint.

I ran valgrind on it for a memcheck, and I’m getting a lot of output after the code has finished executing and ROOT is quit. I did have a few leaks that clearly existed in my code, but most of those were output during the code execution. I have the ROOT suppressions enabled, although it doesn’t seem to suppress almost any of my errors. (Could be a problem with my valgrind command? But the suppression file is called in its correct location.)

I checked a number of older posts on similar subjects, but I don’t have a good feel for what leaks are just part of ROOT that are intentionally not cleaned, or false positives. My feeling is I should get an expert opinion on the valgrind detected leaks that are not suppressed.

I’m happy to post my code, but that might take some explaining. At first, I just like to post my valgrind outputs, to see blindly if one can say these are standard things for ROOT or if I’m creating memory leaks in my code.

It’s not for the faint of heart, though. Almost 30,000 lines.

My ROOT version is slightly dated (5.24/00b). But there are other programs on my machine which prefer this version, so I’d prefer not to update right now.

gcc is 4.4.3.

OS is Gentoo Linux

The main program being called here is ana3.C. Only about ten of the reported leaks are directly descending from the program. I tried to fix all I could, but I’m new at this. So I feel like those are the most likely to be real leaks. The rest I have no idea about.

Any help would be greatly appreciated. Log file is attached.

I didn’t see the log file I tried to attach. Attempting again. (Maybe it’s too big?)

Or it’s hosted http://www.goatface.org/physix/valgrind.log

Hi,

we’ve done a pretty good job in reducing the amount of memory leaks :slight_smile: Also the suppression file is much more relevant nowadays. If you cannot move to a more recent version (as you say) then for you a good rule of thumb is: ignore all leak reports that have TClass or TROOT in their call stack.

Through you’ll probably want to fix the memory error that valgrind complains about.

Cheers, Axel.

I assume newer suppression files will equally apply to my slightly older version of ROOT. Anyway, I’ll grab that one and see if it can help me out a bit. For this work, I can probably use a newer version of ROOT, but a binary program I have was compiled against an older version, and 5.24 was about the latest I could manage. I considered trying to slot ROOT on my machine, but lacking the time. Anyway, personally I think slotting would be a super handy feature, but I’m not sure many other people would care. It’s quite off topic here, but is this worth a feature request? It looked like a task much larger than Gentoo’s portage alone. Seems like it could be really helpful for developers.

Okay, I’ll grind again and try to resolve those ones. I put aside work on it to see if I’d get your reply, since from my forum searches, you’re the one helping most people out on valgrind reports.

Cheers!