By default valgrind is not selectable in menuconfig for IMX6 platform when crosscompiling for Openwrt, but this platform is based on ARM Cortex A9 core which is implementing ARMv7 architecture. This architecture is supported by valgrind, so I made little changes in Makefile of valgrind package to make the package selectable from menuconfig and compilable.
I'm using GCC-5.3 and uClibc-0.9.33.2 (can't proceed to musl for now because it is very expensive).
The problem is that valgrind is not working properly even for /bin/true
:
valgrind --leak-check=yes /bin/true
Output:
...
==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)
As a workaround
--ignore-range-below=44-13
valgrind parameter could be used.As John Reiser said:
Full description of this issue can be found at Valgrind-users mailing list under the topic: