Can someone please show me an example of how to add custom suppressions to valgrind? I am 99.99% sure it generates an error for the string class and I want to suppress the errors in a .supp file. I thought it would be simple enough just adding it to the directory or just adding my function to the default.supp but the error is not suppress. This is what I did:
1) I Ran valgrind with --gen-suppressions=yes 2) Obtained the generated suppression for my error listed below
#Custom Suppression { MyCustomSupression Memcheck:Addr1 fun:strlen fun:_ZNSsC1EPKcRKSaIcE obj:/home/steve/path/to/the/program obj:/home/steve/path/to/the/program obj:/home/steve/path/to/the/program obj:/home/steve/path/to/the/program obj:/home/steve/path/to/the/program obj:/home/steve/path/to/the/program obj:/home/steve/path/to/the/program fun:(below main) }
3) I added the file to the directory where default.supp is located which is in my eclipse folder
4) I ran valgrind again but the error is still there
Note: I also tried adding the suppression to the default.supp file. Am I missing a step? What am I doing wrong?
std::stringshould valgrind cleanly.