【发布时间】:2018-02-09 01:53:37
【问题描述】:
默认情况下,在为 Openwrt 进行交叉编译时,IMX6 平台的 menuconfig 中无法选择 valgrind,但该平台基于实现 ARMv7 架构的 ARM Cortex A9 内核。该架构由 valgrind 支持,因此我对 valgrind 包的 Makefile 进行了一些更改,以使该包可从 menuconfig 中选择并可编译。
我正在使用 GCC-5.3 和 uClibc-0.9.33.2(目前无法继续使用 musl,因为它非常昂贵)。
问题是即使/bin/true valgrind 也无法正常工作:
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)
【问题讨论】: