使用Valgrind的地块工具,结果未创建
问题描述:
我一直在关注这个教程参考文件: http://valgrind.org/docs/manual/ms-manual.html使用Valgrind的地块工具,结果未创建
当我用它来分析我的应用程序中使用的命令: 的valgrind --tool =地块 - time-unit = B ./run.o 它结束但不产生任何输出文件。 下面是使用上述命令运行日志时的日志。
https://www.dropbox.com/s/yae78rm9wmdbph1/ValGring_massif_Log?dl=0
请说明为什么它会不会产生massif.out.xxxxx文件?
答
如果你看看你的日志文件,你会看到Valgrind的 已经崩溃了,它解释了为什么,以及你应该怎么做才能修复它。
valgrind: m_mallocfree.c:304 (get_bszB_as_is): Assertion 'bszB_lo == bszB_hi' failed.
valgrind: Heap block lo/hi size mismatch: lo = 91849568, hi = 1425748016.
This is probably caused by your program erroneously writing past the
end of a heap block and corrupting heap metadata. If you fix any
invalid writes reported by Memcheck, this assertion failure will
probably go away. Please try that before reporting this as a bug.
使用Valgrind的的memcheck
修复 你的程序,然后再试一次。