Valgrind:禁用条件跳转(或整个库)检查

我正在使用OpenSSL API开发应用程序.众所周知,OpenSSL使用全局变量的miriades,由Valgrind作为错误(“条件跳转或移动……”等).因此,Valgrind的输出被共享库中的错误堵塞.这对于调试来说非常不方便,因为每次我得到:

More than X total errors detected. I’m not reporting any more.
Final error counts will be inaccurate. Go fix your program!

问题是:

>我可以在Valgrind中禁用派对库(在我的情况下为-lssl和-lcrypto)内存检查吗?
>或者我可以只关注“明确丢失”的错误吗?

谢谢.

最佳答案
Valgrind可以配置为压制库中的错误.

您可以在此处找到详细信息:http://valgrind.org/docs/manual/manual-core.html#manual-core.suppress

从上面链接的网页:

Note: By far the easiest way to add suppressions is to use the –gen-suppressions=yes option described in Core Command-line Options. This generates suppressions automatically. For best results,though,you may want to edit the output of –gen-suppressions=yes by hand,in which case it would be advisable to read through this section.

相关文章

在Linux上编写运行C语言程序,经常会遇到程序崩溃、卡死等异...
git使用小结很多人可能和我一样,起初对git是一无所知的。我...
1. 操作系统环境、安装包准备 宿主机:Max OSX 10.10.5 虚拟...
因为业务系统需求,需要对web服务作nginx代理,在不断的尝试...
Linux模块机制浅析 Linux允许用户通过插入模块,实现干预内核...
一、Hadoop HA的Web页面访问 Hadoop开启HA后,会同时存在两个...