忽略Valgrind memcheck中的函数

时间:2011-01-05 16:06:02

标签: valgrind suppress-warnings

Valgrinding使用openldap2的libldap的程序是一件苦差事,因为OpenSSL使用了未初始化的内存。存在--ignore-fn选项,但仅适用于Valgrind的massif子组件。 memcheck是否有类似的东西可以排除某些函数出现的痕迹?

==13795== Use of uninitialised value of size 8
==13795==    at 0x6A9C8CF: ??? (in /lib64/libz.so.1.2.3)
==13795==    by 0x6A9A63B: inflate (in /lib64/libz.so.1.2.3)
==13795==    by 0x68035C1: ??? (in /lib64/libcrypto.so.1.0.0)
==13795==    by 0x6802B9F: COMP_expand_block (in /lib64/libcrypto.so.1.0.0)
==13795==    by 0x64ABBCD: ssl3_do_uncompress (in /lib64/libssl.so.1.0.0)
==13795==    by 0x64ACA6F: ssl3_read_bytes (in /lib64/libssl.so.1.0.0)
==13795==    by 0x64A9F2F: ??? (in /lib64/libssl.so.1.0.0)
==13795==    by 0x56B3E61: ??? (in /usr/lib64/libldap-2.4.so.2.5.4)
==13795==    by 0x5E4DB1B: ??? (in /usr/lib64/liblber-2.4.so.2.5.4)
==13795==    by 0x5E4E96E: ber_int_sb_read (in /usr/lib64/liblber-2.4.so.2.5.4)
==13795==    by 0x5E4B4A6: ber_get_next (in /usr/lib64/liblber-2.4.so.2.5.4)
==13795==    by 0x568FB9E: ??? (in /usr/lib64/libldap-2.4.so.2.5.4)

1 个答案:

答案 0 :(得分:14)

您可以创建一个抑制文件,并使用它来抑制来自某些来源的错误:http://valgrind.org/docs/manual/manual-core.html#manual-core.suppress