Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to ignore "possibly lost" in valgrind

Tags:

valgrind

glib

I recently use valgrind with glib(with gobject), it doesn't work very well.

I have added G_SLICE=always-malloc G_DEBUG=gc-friendly in the command line, but there's still many "possibly lost" reported by valgrind.

As I use valgrind in automated testsuit, so I add --error-exitcode=1, but those "possibly lost" will make valgrind exit with 1, which will case my test fail.

Does anyone know how to make valgrind not treat "possibly lost" as errors.

like image 402
tomnotcat Avatar asked Jun 13 '12 00:06

tomnotcat


1 Answers

With valgrind 3.7.0, use: --show-possibly-lost=no|yes show possibly lost blocks in leak check? [yes]

like image 182
phd Avatar answered Sep 19 '22 06:09

phd