2017-08-31 241 views
0

默認情況下,在針對Openwrt進行交叉編譯時,valgrind在menuconfig中對IMX6平臺不可選,但此平臺基於實施ARMv7體系結構的ARM Cortex A9內核。這種體系結構由valgrind支持,所以我對valgrind軟件包的Makefile做了些許更改,使得軟件包可以在menuconfig和compilable中進行選擇。
我正在使用GCC-5.3和uClibc-0.9.33.2(現在無法繼續使用musl,因爲它非常昂貴)。
的問題是,Valgrind是不是即使/bin/true正常工作:Valgrind在imx6平臺上的Openwrt上無法正常工作

valgrind --leak-check=yes /bin/true 

輸出:

... 
==24113== Invalid read of size 4 
==24113== at 0x4000E54: ??? (in /lib/ld-uClibc-0.9.33.2.so) 
==24113== Address 0x7d99c9f4 is on thread 1's stack 
==24113== 20 bytes below stack pointer 
... 
==24113== For counts of detected and suppressed errors, rerun with: -v 
==24113== ERROR SUMMARY: 64 errors from 4 contexts (suppressed: 0 from 0) 

回答

0

作爲一種變通方法--ignore-range-below=44-13 Valgrind的參數都可以使用。
正如約翰·賴澤說:

使用 - 忽略區間低於SP並降低噪音,但忽略了實際的錯誤,在此範圍內引用的 危險。

這個問題的完整描述在Valgrind-users mailing list主題下找到:

[Valgrind的用戶] Valgrind的不imx6平臺正常工作

相關問題