2015-06-15 70 views
0

我一直在關注這個教程參考文件: 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文件?

回答

1

如果你看看你的日誌文件,你會看到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修復 你的程序,然後再試一次。