How do you tell Valgrind to completely suppress a particular .so file?

后端 未结 3 1231
野趣味
野趣味 2020-12-05 02:32

I\'m trying to use Valgrind on a program that I\'m working on, but Valgrind generates a bunch of errors for one of the libraries that I\'m using. I\'d like to be able to tel

3条回答
  •  佛祖请我去吃肉
    2020-12-05 03:12

    nobar's answer almost worked for me, but I was getting a syntax error:

    ==15566== FATAL: in suppressions file "suppresion.error.txt" near line 4:
    ==15566==    bad or missing extra suppression info
    ==15566== exiting now.
    

    For system calls, I needed to add an extra line as the docs state:

    Param errors have a mandatory extra information line at this point,
    which is the name of the offending system call parameter.
    

    So I ended up with this and it worked:

    {
       
       Memcheck:Param
       mmap(length)
       ...
       fun:function_from_offending_lib
       ...
    }
    

提交回复
热议问题