Application doesn't leak memory running valgrind

Stefano Antonelli <[email protected]>
Newsgroups gmane.comp.debugging.valgrind
Message-ID <[email protected]>
Hello list,

I have a Qml application that leaks memory when run normally.  I've
reduced it to a very simple Qml app and it still leaks.  And the leak
is visible with pmap almost immediately.  The application runs on an
embedded device (armhf).

When I run it with valgrind:

 /usr/bin/valgrind.bin --tool=memcheck --error-limit=no \
--log-file=vg-220214.log  --leak-check=full \
--leak-resolution=high --show-reachable=yes ./qml-mwe3

There is no leak.  I've tried running it for a solid day and pmap
doesn't show any leak.

If I run the same application in gdb (just letting it run).  It leaks.
 However, if I put a break point on malloc:

gdb ./qml-mwe3
(gbd) run
--- some time passes ---
^C
(gdb) break malloc
(gdb) commands
> continue
> end
(gdb) run

Then the leak stops.  No memory is freed, but it absolutely stops
increasing.

Can anyone offer any guesses as to what's going on?  I would appreciate
any ideas to debug this further.

Thanks,
Stef
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.