Bug 441069 - Process terminating with default action of signal 4 (SIGILL) Illegal opcode at address 0x580A3C2C at 0x4000B00: ??? (in /lib/ld-2.26.so)
Summary: Process terminating with default action of signal 4 (SIGILL) Illegal opcode...
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR grave
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-17 07:01 UTC by zhongzheng.cui
Modified: 2025-03-15 09:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
memtest.c (150 bytes, text/x-csrc)
2021-08-17 07:01 UTC, zhongzheng.cui
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zhongzheng.cui 2021-08-17 07:01:29 UTC
Created attachment 140787 [details]
memtest.c

SUMMARY

/mnt/usb1_1/valgrind-0815/valgrind/bin # ./valgrind -v /var/memtest 
==3756== Memcheck, a memory error detector
==3756== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==3756== Using Valgrind-3.17.0-07f0cdcbb4-20210319X and LibVEX; rerun with -h for copyright info
==3756== Command: /var/memtest
==3756== 
--3756-- Valgrind options:
--3756--    -v
--3756-- Contents of /proc/version:
--3756--   Linux version 4.1.25+ (cuizhongzheng@whubuntu) (gcc version 4.9.4 (Buildroot 2017.05-svn2186) ) #20 SMP PREEMPT Tue Aug 17 14:15:48 CST 2021
--3756-- ZXIC inner version : CTCSV4.2.0B03
--3756-- ZXIC svn number : 4eb8244f
--3756-- ZXIC extra message : SGUG
--3756-- 
--3756-- Arch and hwcaps: ARM, LittleEndian, ARMv7
--3756-- Page sizes: currently 4096, max supported 4096
--3756-- Valgrind library directory: /var/valgrind/libexec/valgrind
--3756-- Reading syms from /var/memtest
--3756--   Reading EXIDX entries: 1 available
--3756--   Reading EXIDX entries: 0 attempted, 0 successful
--3756-- Reading syms from /lib/ld-2.26.so
--3756-- Reading syms from /mnt/usb1_1/valgrind-0815/valgrind/libexec/valgrind/memcheck-arm-linux
--3756--    object doesn't have a dynamic symbol table
--3756-- Scheduler: using generic scheduler lock implementation.
--3756-- Reading suppressions file: /var/valgrind/libexec/valgrind/default.supp
==3756== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-3756-by-root-on-???
==3756== embedded gdbserver: writing to   /tmp/vgdb-pipe-to-vgdb-from-3756-by-root-on-???
==3756== embedded gdbserver: shared mem   /tmp/vgdb-pipe-shared-mem-vgdb-3756-by-root-on-???
==3756== 
==3756== TO CONTROL THIS PROCESS USING vgdb (which you probably
==3756== don't want to do, unless you know exactly what you're doing,
==3756== or are doing some strange experiment):
==3756==   /var/valgrind/libexec/valgrind/../../bin/vgdb --pid=3756 ...command...
==3756== 
==3756== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==3756==   /path/to/gdb /var/memtest
==3756== and then give GDB the following command
==3756==   target remote | /var/valgrind/libexec/valgrind/../../bin/vgdb --pid=3756
==3756== --pid is optional if only one valgrind process is running
==3756== 
==3756== 
==3756== Process terminating with default action of signal 4 (SIGILL)
==3756==  Illegal opcode at address 0x580A3C2C
==3756==    at 0x4000B00: ??? (in /lib/ld-2.26.so)
==3756== 
==3756== HEAP SUMMARY:
==3756==     in use at exit: 0 bytes in 0 blocks
==3756==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==3756== 
==3756== All heap blocks were freed -- no leaks are possible
==3756== 
==3756== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Illegal instruction

STEPS TO REPRODUCE

./valgrind -v /var/memtest

OBSERVED RESULT

Process terminating with default action of signal 4 (SIGILL)   Illegal opcode at address 0x580A3C2C    at 0x4000B00: ??? (in /lib/ld-2.26.so)


EXPECTED RESULT


 
Linux/KDE Plasma: 
Linux localhost 4.1.25

ADDITIONAL INFORMATION


CPU:
/ # cat /proc/cpuinfo 
processor       : 0
model name      : ARMv7 Processor rev 1 (v7l)
BogoMIPS        : 1987.37
Features        : half thumb fastmult edsp tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x4
CPU part        : 0xc09
CPU revision    : 1

processor       : 1
model name      : ARMv7 Processor rev 1 (v7l)
BogoMIPS        : 1993.93
Features        : half thumb fastmult edsp tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x4
CPU part        : 0xc09
CPU revision    : 1

Hardware        : SKYWORTH ZX279128S (Device Tree)
Revision        : 0000
Serial          : 0000000000000000
Comment 1 Philippe Waroquiers 2022-08-22 18:43:02 UTC
As far as I can see, your test program is trivial.
If valgrind does not work at all on such a trivial program, it might be due to your specific installation/version of the OS
(your program crashes in the dynamic loader).

So, the first thing to do is to try with the latest  valgrind version (3.19.0 or the git version)
Comment 2 kurte1986 2025-03-15 09:33:19 UTC
Comment on attachment 140787 [details]
memtest.c

>#include <stdlib.h>
>#include <stdio.h>
>#include <string.h>
>
>
>void main(void)
>{
>    void *ptr = malloc(100);
>    
>    while(1)
>    {
>		sleep(2);
>	}	
>}