I have a little program that use gdbus binding.
I run valgrind with this command line:
G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind --tool=memcheck 
--leak-check=full --leak-resolution=high --num-callers=20 
--suppressions=/home/ubuntu/gtk.suppression ./my-dbus-program

G_SLICE and G_DEBUG helps to cut down reported errors, but some errors 
are still reported
It seems that they are not in my code:

------------------------8<-----------------------------------------------
==4613== HEAP SUMMARY:
==4613==     in use at exit: 61,489 bytes in 1,063 blocks
==4613==   total heap usage: 246,982 allocs, 245,919 frees, 8,866,890 
bytes allocated
==4613==
==4613== 4 bytes in 1 blocks are possibly lost in loss record 23 of 695
==4613==    at 0x402BE68: malloc (in 
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==4613==    by 0x402C007: realloc (in 
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==4613==    by 0x4240762: ??? (in 
/lib/i386-linux-gnu/libglib-2.0.so.0.3200.3)
==4613==    by 0x4240F18: g_realloc (in 
/lib/i386-linux-gnu/libglib-2.0.so.0.3200.3)
==4613==    by 0x42411FA: g_realloc_n (in 
/lib/i386-linux-gnu/libglib-2.0.so.0.3200.3)
==4613==    by 0x41CDAC9: ??? (in 
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0.3200.3)
==4613==    by 0x41CE240: ??? (in 
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0.3200.3)
==4613==    by 0x41D302C: g_type_register_static (in 
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0.3200.3)
==4613==    by 0x41DDDEB: g_pointer_type_register_static (in 
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0.3200.3)
==4613==    by 0x41DDE5F: g_gtype_get_type (in 
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0.3200.3)
==4613==    by 0x41C002F: ??? (in 
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0.3200.3)
==4613==
==4613== 8 bytes in 1 blocks are possibly lost in loss record 196 of 695
==4613==    at 0x402BE68: malloc (in 
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==4613==    by 0x402C007: realloc (in 
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==4613==    by 0x4240762: ??? (in 
/lib/i386-linux-gnu/libglib-2.0.so.0.3200.3)
==4613==    by 0x4240F18: g_realloc (in 
/lib/i386-linux-gnu/libglib-2.0.so.0.3200.3)
==4613==    by 0x42411FA: g_realloc_n (in 
/lib/i386-linux-gnu/libglib-2.0.so.0.3200.3)
==4613==    by 0x41CEBC9: ??? (in 
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0.3200.3)
==4613==    by 0x41D37CE: g_type_register_fundamental (in 
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0.3200.3)
==4613==    by 0x41BCE1F: ??? (in 
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0.3200.3)
==4613==
[...]
==4613==
==4613== LEAK SUMMARY:
==4613==    definitely lost: 0 bytes in 0 blocks
==4613==    indirectly lost: 0 bytes in 0 blocks
==4613==      possibly lost: 3,504 bytes in 124 blocks
==4613==    still reachable: 57,985 bytes in 939 blocks
==4613==         suppressed: 0 bytes in 0 blocks
==4613== Reachable blocks (those to which a pointer was found) are not 
shown.
==4613== To see them, rerun with: --leak-check=full --show-reachable=yes
==4613==
==4613== For counts of detected and suppressed errors, rerun with: -v
==4613== ERROR SUMMARY: 48 errors from 48 contexts (suppressed: 0 from 0)
------------------------8<-----------------------------------------------

how can I suppress errors that do not come from my code?

thanks

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to