Is it possible to make valgrind ignore certain libraries?

前端 未结 3 940
清歌不尽
清歌不尽 2020-11-29 07:58

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

3条回答
  •  盖世英雄少女心
    2020-11-29 08:18

    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.

提交回复
热议问题