【问题标题】:How to get the error report of valgrind?如何获取valgrind的错误报告?
【发布时间】:2023-03-26 11:24:02
【问题描述】:

首先我是这样运行的:

valgrind --leak-check=full --show-leak-kinds=all test_proc

和日志:

==30349== For counts of detected and suppressed errors, rerun with: -v
==30349== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)

所以我和-v一起跑

valgrind -v --leak-check=full --show-leak-kinds=all test_proc

和日志:

==8020== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)
==8020== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)

我找不到其他错误关键字。哪里出错了?

【问题讨论】:

  • 完整报告只有两行吗?你有没有试过--log-file=把报告写在一个文件里,当终端出现乱码时很有用
  • 是的,我用--log-file,只有这两行包含error

标签: memory-leaks valgrind


【解决方案1】:

我想我已经弄清楚了,7 代表possibly lostdefinitely lost 记录的总数。

【讨论】:

    猜你喜欢
    • 2011-07-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-07
    • 1970-01-01
    • 2014-07-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多