【问题标题】:Valgrind not working properly on Openwrt on imx6 platformValgrind 在 imx6 平台上的 Openwrt 上无法正常工作
【发布时间】: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)

【问题讨论】:

    标签: arm valgrind openwrt imx6


    【解决方案1】:

    可以使用--ignore-range-below=44-13 valgrind 参数作为解决方法。
    正如 John Reiser 所说:

    使用 --ignore-range-below-sp 确实可以减少噪音,但 忽略该范围内引用的实际错误的危险。

    这个问题的完整描述可以在Valgrind-users mailing list的主题下找到:

    [Valgrind-users] Valgrind 在 imx6 平台上无法正常工作

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-11
      • 1970-01-01
      • 1970-01-01
      • 2016-03-11
      • 1970-01-01
      相关资源
      最近更新 更多