Or preferably all of them instead of just my code? My program uses Gtk, Loudmouth and few other things, and these two (and some behind them, libgcrypto, libssl) are causing so many errors themselves that I'm unable to detect my own. Is it possible to make valgrind ignore things coming from deeper than my own code?
+1
A:
You can generate suppressions for the errors for the libraries, but I don't think you can exclude the libraries generally.
Also it's hard to automatically know if a memory error in the library is caused by a problem in your code or not.
Douglas Leeder
2010-07-04 11:40:34
http://valgrind.org/docs/manual/manual-core.html#manual-core.suppress This is the link for information on error suppression for valgrind.
blwy10
2010-07-04 13:35:28
A:
With OpenSSL in particular, this is very hard. SSL encryption keys are partially based on uninitialized stack garbage, which means that all decrypted data is contaminated too. This contamination tends to spread beyond OpenSSL itself.
Compiling OpenSSL with a "PURIFY" option may help here. Unfortunately, due to some poorly thought out actions by a major Linux distribution, this is unlikely to become default.
A very blunt workaround is memcheck's --undef-value-errors=no
option.
jilles
2010-07-04 13:15:26