加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

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

发布时间:2020-12-13 19:01:38 所属栏目:Linux 来源:网络整理
导读:我正在使用OpenSSL API开发应用程序.众所周知,OpenSSL使用全局变量的miriades,由Valgrind作为错误(“条件跳转或移动”等).因此,Valgrind的输出被共享库中的错误堵塞.这对于调试来说非常不方便,因为每次我得到: More than X total errors detected. Im not r

我正在使用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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读