Hi!
By default valgrind is not selectable in menuconfig for IMX6 platform when
cross compiling 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:
==19124== Memcheck, a memory error detector
==19124== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==19124== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==19124== Command: /bin/true
==19124==
==19124== Invalid read of size 4
==19124== at 0x40054EC: ??? (in /lib/ld-uClibc-0.9.33.2.so)
==19124== Address 0x7df01864 is on thread 1's stack
==19124== 20 bytes below stack pointer
==19124==
==19124== Invalid read of size 4
==19124== at 0x48B8CD4: ??? (in /lib/libuClibc-0.9.33.2.so)
==19124== Address 0x7df01a5c is on thread 1's stack
==19124== 20 bytes below stack pointer
==19124==
==19124== Invalid read of size 4
==19124== at 0x48B8AC0: ??? (in /lib/libuClibc-0.9.33.2.so)
==19124== Address 0x7df01a04 is on thread 1's stack
==19124== 20 bytes below stack pointer
==19124==
==19124== Invalid read of size 4
==19124== at 0x4000E54: ??? (in /lib/ld-uClibc-0.9.33.2.so)
==19124== Address 0x7df019f4 is on thread 1's stack
==19124== 20 bytes below stack pointer
==19124==
==19124==
==19124== HEAP SUMMARY:
==19124== in use at exit: 0 bytes in 0 blocks
==19124== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==19124==
==19124== All heap blocks were freed -- no leaks are possible
==19124==
==19124== For counts of detected and suppressed errors, rerun with: -v
==19124== ERROR SUMMARY: 64 errors from 4 contexts (suppressed: 0 from 0)
I found that "-D__UCLIBC__" flag should be applied when compiling valgrind,
but that didn't help, the output is the same.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users