Is valgrind catching Qt 4.8 on Debian Wheezy leaking memory in minimalist app?

I've read several questions here where people run minimal Qt programs through valgrind, and post the results. The general verdict from looking over the output is "well, there are no actual leaks, it's just how Qt uses memory".

However, what I'm getting with a basically empty application looks...worse. I'm getting "definitely lost" leaks, for instance:

https://gist.github.com/3204769

==32147== LEAK SUMMARY:
==32147==    definitely lost: 848 bytes in 11 blocks
==32147==    indirectly lost: 1,756 bytes in 53 blocks
==32147==      possibly lost: 1,720 bytes in 9 blocks
==32147==    still reachable: 121,019 bytes in 2,257 blocks
==32147==         suppressed: 0 bytes in 0 blocks

Running with:

valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes ./testing 2> valgrind.log

I'm a little bit bleeding edge with this setup, to try and get a relatively-recent C++11-compiling gcc:

If I do sudo kwrite --version I get:

Qt: 4.8.1
KDE Development Platform: 4.8.4 (4.8.4)
KWrite: 4.8.3 (4.8.3)

Anyone in a similar situation, or know what is going on here? :-/

Upvotes: 2

Views: 363

Answers (1)

sim82
sim82

Reputation: 88

most of that stuff seems to be internal 'global' state of the libraries you are using. One can argue if it is good style to cleanup global resources by 'program termination', but it is probably ok if done right. I personally don't like it, as it makes detection of real leaks harder...

Upvotes: 0

Related Questions