Adi
Adi

Reputation: 562

valgrind multiple type suppression

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:* but valgrind exited with code 1.

So, the question is, can't I combine multiple types of errors in a single suppresion for memcheck?

Upvotes: 2

Views: 640

Answers (1)

Raunaq
Raunaq

Reputation: 1873

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.

Upvotes: 3

Related Questions