I'm writing a suppression file for valgrind and I have one like this (taken from the core manual)
{
libX11.so.6.2/libX11.so.6.2/libXaw.so.7.0
Memcheck:Value4
obj:/usr/X11R6/lib/libX11.so.6.2
obj:/usr/X11R6/lib/libX11.so.6.2
obj:/usr/X11R6/lib/libXaw.so.7.0
}
I want to also suppress this
{
libX11.so.6.2/libX11.so.6.2/libXaw.so.7.0
Memcheck:Cond
obj:/usr/X11R6/lib/libX11.so.6.2
obj:/usr/X11R6/lib/libX11.so.6.2
obj:/usr/X11R6/lib/libXaw.so.7.0
}
Do I really need to write two suppressions to achieve this? I've searched the manual and online doc and I didn't find an answer. I also tried MemCheck:开发者_JAVA技巧*
but valgrind exited with code 1.
So, the question is, can't I combine multiple types of errors in a single suppresion for memcheck?
No. For multiple suppression types it is necessary to write different suppression blocks even if the calling contexts are the same.
Also as can be seen in Valgrind's documentation: http://valgrind.org/docs/manual/mc-manual.html#mc-manual.suppfiles there can only be a single suppression-type.
精彩评论