SUMMARY I am running my application with Valgrind for memory error analysis. While doing so, the application starts but seems to be hanging - not producing any logs or not doing any usual activities that it's supposed to do. Running 'vgdb backtrace' command indicates that valgrind has issue SIGILL signal due to one of the ARM64 instruction is unrecognized by Valgrind. Googling around the instruction code it points to crypto extension instructions added to ARM8.2. The instruction code 0xCEC08000 seems to be SHA512SU0. Since this is a valid instruction I am filing this bug. STEPS TO REPRODUCE 1. Start any program which uses this instruction with Valgrind. 2. Run 'vgdb backtrace' command 3. You will see the output given in observed result. OBSERVED RESULT [09/10/2024, 11:26:41.427 PM] [ 25.930175] disInstr(arm64): unhandled instruction 0xCEC08000 [09/10/2024, 11:26:41.527 PM] [ 25.936161] disInstr(arm64): 1100'1110 1100'0000 1000'0000 0000'0000 [09/10/2024, 11:26:41.527 PM] [ 25.943057] ==2276== valgrind: Unrecognised instruction at address 0x53c9690. [09/10/2024, 11:26:41.527 PM] [ 25.950601] ==2276== at 0x53C9690: ??? (in /usr/lib/libcrypto.so.1.1) [09/10/2024, 11:26:41.527 PM] [ 25.957650] ==2276== Your program just tried to execute an instruction that Valgrind [09/10/2024, 11:26:41.527 PM] [ 25.965812] ==2276== did not recognise. There are two possible reasons for this. [09/10/2024, 11:26:41.527 PM] [ 25.973793] ==2276== 1. Your program has a bug and erroneously jumped to a non-code [09/10/2024, 11:26:41.530 PM] [ 25.981851] ==2276== location. If you are running Memcheck and you just saw a [09/10/2024, 11:26:41.530 PM] [ 25.989696] ==2276== warning about a bad jump, it's probably your program's fault. [09/10/2024, 11:26:41.530 PM] [ 25.997902] ==2276== 2. The instruction is legitimate but Valgrind doesn't handle it, [09/10/2024, 11:26:41.531 PM] [ 26.006059] ==2276== i.e. it's Valgrind's fault. If you think this is the case or [09/10/2024, 11:26:41.531 PM] [ 26.014265] ==2276== you are not sure, please let us know and we'll try to fix it. [09/10/2024, 11:26:41.531 PM] [ 26.022488] ==2276== Either way, Valgrind will now raise a SIGILL signal which will [09/10/2024, 11:26:41.531 PM] [ 26.030524] ==2276== probably kill your program. EXPECTED RESULT Valgrind should not raise above error and let the app execute it. SOFTWARE/OS VERSIONS aarch64 linux built using Yocto project. ADDITIONAL INFORMATION
Please try the most recent version of Valgrind. Ideally please try building it from source. 3.18 is quite old and Iโm fairly sure that there have been some sha512 fixes.
This is most likely https://bugs.kde.org/show_bug.cgi?id=447989 Note that bug is fixed now, but the fix isn't yet in a release, so you would have to test with a current git version.
I tried testing this in latest valgrind version 3.23.0, built it from code, but I saw the same error of unrecognized instruction. I can test this with latest valgrind code.
(In reply to harish from comment #3) > I tried testing this in latest valgrind version 3.23.0, built it from code, > but I saw the same error of unrecognized instruction. > > I can test this with latest valgrind code. Yes please, from git head if possible.
Please could you check Valgrind from git head? I see SHA512SU0 in the VEX source.
๐๐งน โ ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME. For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging. Thank you for helping us make KDE software even better for everyone!
๐๐งน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.