Reputation: 574
I am cross-compiling a C / C++ application to run on a Raspberry Pi 4 with the arm-rpi-4.9.3-linux-gnueabihf compiler from the Tools Github Repository on an x64 Debian Linux system running in a VM. I am having some issues with this application so I built Valgrind from source on the Raspberry Pi with GCC 8.3.0-++rpi1.
The compiler binaries I am using can be downloaded here: https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf
If I run Valgrind on the RPI I get a number of errors, many of which indicate "Invalid read of size 8". My understanding is this would be typical on 64-bit architecture (8*8 = 64) but may be misleading on this 32-bit system unless the application was accessing a 64-bit data structure. Also, running Valgrind on the same application, built for and running on an x64 system, does not identify errors at these same locations, which makes me think that either the compilation toolchain is introducing an ABI issue or that Valgrind is giving misleading error indications -- or both.
Valgrind also indicates on startup:
--3451-- Arch and hwcaps: ARM, LittleEndian, ARMv8-neon-vfp --3451-- Page sizes: currently 4096, max supported 4096
However $ uname -m indicates: arm7l, which I understand to be 32 bit (and definitely not ARMv8).
Can anyone provide any guidance on what might be going wrong here?
Thanks!
Upvotes: 0
Views: 231