通过Valgrind检查泄漏时阻止某些功能
在我的程序中,我使用的是GNU Readline,该库中的功能会导致一些泄漏。在使用Valgrind时,我不想看到这些泄漏。我可以以某种方式阻止一些功能吗?
In my program I'm using GNU Readline and the functions from that library causes some leaks. While using Valgrind I don't want to see those leaks. Can I somehow block some functions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我从使用
valgrind-leak-check = full -show-show-leak-kinds = all ./program
我制作了一个名为
supp.supp
并在其中写了:之后,我添加了
- 抑制= supp.supp
flag。现在抑制了Libreadline的所有泄漏错误。I was getting lots of this kind of leak warnings from using
valgrind --leak-check=full --show-leak-kinds=all ./program
I made a file named
supp.supp
and wrote in it:After this, I added
--suppressions=supp.supp
flag. All leak errors from libreadline is now suppressed.