<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>452575</bug_id>
          
          <creation_ts>2022-04-13 13:35:17 +0000</creation_ts>
          <short_desc>Valgrind crashes with segmentation fault and a lot invalid writes on Raspberry Pi 4B</short_desc>
          <delta_ts>2026-02-10 03:16:15 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Developer tools</classification>
          <product>valgrind</product>
          <component>memcheck</component>
          <version>3.18.1</version>
          <rep_platform>Arch Linux</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          <see_also>https://bugs.kde.org/show_bug.cgi?id=469783</see_also>
    
    <see_also>https://sourceware.org/bugzilla/show_bug.cgi?id=29061</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Willam Tang">galaxyking0419</reporter>
          <assigned_to name="Julian Seward">jseward</assigned_to>
          <cc>pjfloyd</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2117224</commentid>
    <comment_count>0</comment_count>
    <who name="Willam Tang">galaxyking0419</who>
    <bug_when>2022-04-13 13:35:17 +0000</bug_when>
    <thetext>SUMMARY
Valgrind crashes with segmentation fault and a lot invalid writes.


STEPS TO REPRODUCE
1. Compile the following program with command &quot;gcc -g main.c&quot;:
#include &lt;stdio.h&gt;

int main()
{
	puts(&quot;Hello World!&quot;);
	return 0;
}
2. valgrind ./a.out

OBSERVED RESULT
==25353== Memcheck, a memory error detector
==25353== Copyright (C) 2002-2017, and GNU GPL&apos;d, by Julian Seward et al.
==25353== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==25353== Command: ./a.out
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x401B100: _dl_start (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fbc14 is on thread 1&apos;s stack
==25353==  120 bytes below stack pointer
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x401236C: _dl_setup_hash (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fbc28 is on thread 1&apos;s stack
==25353==  8 bytes below stack pointer
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x4019548: _dl_sysdep_start (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fbbac is on thread 1&apos;s stack
==25353==  104 bytes below stack pointer
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x4015858: __GI___tunables_init (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fbb4c is on thread 1&apos;s stack
==25353==  96 bytes below stack pointer
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x4012544: _dl_sort_maps_init (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fbbbc is on thread 1&apos;s stack
==25353==  16 bytes below stack pointer
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x401FC24: sbrk (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fbbb0 is on thread 1&apos;s stack
==25353==  16 bytes below stack pointer
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x401BBF0: dl_main (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fb99c is on thread 1&apos;s stack
==25353==  528 bytes below stack pointer
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x400C488: _dl_new_object (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fb96c is on thread 1&apos;s stack
==25353==  48 bytes below stack pointer
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x400BF50: __minimal_calloc (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fb970 is on thread 1&apos;s stack
==25353==  16 bytes below stack pointer
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x400BDF4: __minimal_malloc (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fb96c is on thread 1&apos;s stack
==25353==  24 bytes below stack pointer
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x400C3B8: _dl_add_to_namespace_list (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fb9a0 is on thread 1&apos;s stack
==25353==  16 bytes below stack pointer
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x4019CCC: _dl_discover_osversion (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fb7ac is on thread 1&apos;s stack
==25353==  496 bytes below stack pointer
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x400716C: _dl_init_paths (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fb97c is on thread 1&apos;s stack
==25353==  40 bytes below stack pointer
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x40181F8: _dl_important_hwcaps (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fb904 is on thread 1&apos;s stack
==25353==  112 bytes below stack pointer
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x4018CAC: _dl_hwcaps_split_masked (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fb918 is on thread 1&apos;s stack
==25353==  8 bytes below stack pointer
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x4018BA0: _dl_hwcaps_split (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fb900 is on thread 1&apos;s stack
==25353==  16 bytes below stack pointer
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x4018140: copy_hwcaps (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fb8cc is on thread 1&apos;s stack
==25353==  40 bytes below stack pointer
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x401B074: audit_list_add_dynamic_tag (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fb9b0 is on thread 1&apos;s stack
==25353==  8 bytes below stack pointer
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x40164D4: _dl_audit_activity_map (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fb970 is on thread 1&apos;s stack
==25353==  40 bytes below stack pointer
==25353== 
==25353== Invalid write of size 4
==25353==    at 0x401BACC: handle_preload_list (in /usr/lib/ld-linux-armhf.so.3)
==25353==  Address 0xbd8fa99c is not stack&apos;d, malloc&apos;d or (recently) free&apos;d
==25353== 
==25353== 
==25353== Process terminating with default action of signal 11 (SIGSEGV)
==25353==  Access not within mapped region at address 0xBD8FA99C
==25353==    at 0x401BACC: handle_preload_list (in /usr/lib/ld-linux-armhf.so.3)
==25353==  If you believe this happened as a result of a stack
==25353==  overflow in your program&apos;s main thread (unlikely but
==25353==  possible), you can try to increase the size of the
==25353==  main thread stack using the --main-stacksize= flag.
==25353==  The main thread stack size used in this run was 8388608.
==25353== 
==25353== HEAP SUMMARY:
==25353==     in use at exit: 0 bytes in 0 blocks
==25353==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==25353== 
==25353== All heap blocks were freed -- no leaks are possible
==25353== 
==25353== For lists of detected and suppressed errors, rerun with: -s
==25353== ERROR SUMMARY: 33 errors from 20 contexts (suppressed: 0 from 0)
Segmentation fault

EXPECTED RESULT
Run the program without errors

SOFTWARE/OS VERSIONS
Hardware: Raspberry Pi 4B
OS: Arch Linux ARM (Linux alarmpi 5.15.33-1-rpi-ARCH #1 SMP Mon Apr 11 18:05:07 UTC 2022 armv7l GNU/Linux)

ADDITIONAL INFORMATION
I&apos;ve also created a bug report on glibc bugzilla, link: https://sourceware.org/bugzilla/show_bug.cgi?id=29061</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2282095</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Floyd">pjfloyd</who>
    <bug_when>2024-01-21 10:10:05 +0000</bug_when>
    <thetext>I don&apos;t get any errors with Valgrind 3.19 on a Pi  5 with raspbian.

Your chances of someone working with your combination of HW and OS are, I&apos;m afraid, close to zero.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2470819</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Floyd">pjfloyd</who>
    <bug_when>2025-11-17 08:00:02 +0000</bug_when>
    <thetext>I also have a Pi 4b now.

I have no major issues with FreeBSD 14.3, Ubuntu 24.04 LTS and Raspberry Pi OS 64bit (~Debian Trixie). Raspberry Pi OS 32bit has several serious problems but not to the point that Valgrind does not work with trivial exes.

Please try a recent Valgrind and reopen a new issue if problems persist.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>