I am attempting to use Valgrind with an application on an embedded arm system. Debugging with gdb, a problem is occurring with a shared library used by the application, where gdb is showing a SIGABRT from a malloc call in a well-supported library, but can not show me the memory overwrite problem that must be causing the crash. I was hoping using valgrind could isolate from where the original memory overwrite is occurring.

However as soon as I start 'valgrind --leak-check=yes ./myprogram' I get the message:

==621== Memcheck, a memory error detector
==621== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==621== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==621== Command: ./myprogram
==621==
disInstr(thumb): unhandled instruction: 0xEC51 0x0F1E
==621== valgrind: Unrecognised instruction at address 0x4cc1767.
==621==    at 0x4CC1766: ??? (in /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1)
==621== Your program just tried to execute an instruction that Valgrind
==621== did not recognise.  There are two possible reasons for this.
==621== 1. Your program has a bug and erroneously jumped to a non-code
==621==    location.  If you are running Memcheck and you just saw a
==621==    warning about a bad jump, it's probably your program's fault.
==621== 2. The instruction is legitimate but Valgrind doesn't handle it,
==621==    i.e. it's Valgrind's fault.  If you think this is the case or
==621==    you are not sure, please let us know and we'll try to fix it.
==621== Either way, Valgrind will now raise a SIGILL signal which will
==621== probably kill your program.

Does this mean that valgrind is not reliable for my purposes. It appears impossible that this problem is being caused by any code execution in 'myprogram' since the message occurs at the beginning of my valgrind session and before the first console message 'myprogram' outputs, which is at the beginning of the 'main' routine.



------------------------------------------------------------------------------
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

Reply via email to