Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

valgrind on arm SIGILL due to opensll

I am trying to analyze my application which is running on arm with Valgrind. I am using ssl and libcrypto inside it. So on attempt to analyze it I am receiving SIGILL.

I've tried to disable it

--sigill-diagnostics=no

but it does not help.

I also tried to intercept the signal from within an application itself by adding

signal(SIGILL, SIG_IGN);

to the very start of my application. This does not help as well.

I've tried adding suppression file. But this also does not resolve an issue.

Is there any other methods to get valgrind running on arm with ssl ? Is it possible at all to do it?

Thanks in advance.

like image 894
unresolved_external Avatar asked Jan 17 '26 09:01

unresolved_external


1 Answers

I faced the same problem as described by @unresolved_external on an ARMv7 based platform. Even calling valgrind with parameter --sigill-diagnostics=no in the right order did not help:

valgrind --sigill-diagnostics=no /path/to/your/program

valgrinds output complained about to different illegal instructions:

  • 0xEBAD 0x1CCA and
  • 0xEC51 0x0F1E.

With further internet research I found patches for both unhandled instructions on https://bugsfiles.kde.org:

  1. 0xEBAD 0x1CCA
    discussion: https://together.jolla.com/question/205808/help-unable-to-profile-app-with-valgrind/ patch: https://bugsfiles.kde.org/attachment.cgi?id=108118
  2. 0xEC51 0x0F1E
    discussion: https://bugs.kde.org/show_bug.cgi?id=344802
    patch: https://bugsfiles.kde.org/attachment.cgi?id=113735

Compilation of valgrind using both patches resolved any error message when analyzing my executable linked to OpenSSL libcrypto.so.

like image 186
Erwin Nindl Avatar answered Jan 21 '26 09:01

Erwin Nindl