https://bugs.kde.org/show_bug.cgi?id=523626

            Bug ID: 523626
           Summary: none/tests/x86/sse4-x86 fails when valgrind compiled
                    with clang
    Classification: Developer tools
           Product: valgrind
      Version First 3.27 GIT
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: memcheck
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

As of commit c5c0516d1c71113192f5e9b55669fdbcd03b4de7 , testcase
none/tests/x86/sse4-x86 fails when valgrind is compiled with clang.  With GCC
built valgrind, the testcase passes.  The testcase itself may be compiled with
any of gcc or clang, that doesn't change things:

$ eu-readelf --debug-dump=info memcheck/memcheck-x86-linux | fgrep -i produ |
head -1
           producer             (strx1) "clang version 22.1.8 (Fedora
22.1.8-4.fc44)"
$
$
$ eu-readelf --debug-dump=info none/tests/x86/sse4-x86.gcc | fgrep -i produ |
head -1
           producer             (strp) "GNU C23 16.1.1 20260515 (Red Hat
16.1.1-2) -m32 -mmmx -msse -mtune=generic -march=i686 -mtls-dialect=gnu2 -g
-fno-stack-protector"
$
$
$ eu-readelf --debug-dump=info none/tests/x86/sse4-x86.clang | fgrep -i produ |
head -1
           producer             (strx1) "clang version 22.1.8 (Fedora
22.1.8-4.fc44)"
$
$
$ ./vg-in-place ./none/tests/x86/sse4-x86.gcc >/dev/null
==858909== Memcheck, a memory error detector
==858909== Copyright (C) 2002-2026, and GNU GPL'd, by Julian Seward et al.
==858909== Using Valgrind-3.28.0.GIT and LibVEX; rerun with -h for copyright
info
==858909== Command: ./none/tests/x86/sse4-x86.gcc
==858909== 
==858909== 
==858909== Process terminating with default action of signal 11 (SIGSEGV):
dumping core
==858909==  General Protection Fault
==858909==    at 0x806BD46: test_MPSADBW (sse4-common.h:993)
==858909==    by 0x807311B: main (sse4-x86.c:257)
==858909== 
==858909== HEAP SUMMARY:
==858909==     in use at exit: 4,096 bytes in 1 blocks
==858909==   total heap usage: 557 allocs, 556 frees, 12,992 bytes allocated
==858909== 
==858909== LEAK SUMMARY:
==858909==    definitely lost: 0 bytes in 0 blocks
==858909==    indirectly lost: 0 bytes in 0 blocks
==858909==      possibly lost: 0 bytes in 0 blocks
==858909==    still reachable: 4,096 bytes in 1 blocks
==858909==         suppressed: 0 bytes in 0 blocks
==858909== Rerun with --leak-check=full to see details of leaked memory
==858909== 
==858909== For lists of detected and suppressed errors, rerun with: -s
==858909== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Segmentation fault         (core dumped) ./vg-in-place
./none/tests/x86/sse4-x86.gcc > /dev/null
$ 
$ 
$ ./vg-in-place ./none/tests/x86/sse4-x86.clang >/dev/null
==858958== Memcheck, a memory error detector
==858958== Copyright (C) 2002-2026, and GNU GPL'd, by Julian Seward et al.
==858958== Using Valgrind-3.28.0.GIT and LibVEX; rerun with -h for copyright
info
==858958== Command: ./none/tests/x86/sse4-x86.clang
==858958== 
==858958== 
==858958== Process terminating with default action of signal 11 (SIGSEGV):
dumping core
==858958==  General Protection Fault
==858958==    at 0x8069BFE: test_MPSADBW (sse4-common.h:993)
==858958==    by 0x8048EFB: main (sse4-x86.c:257)
==858958== 
==858958== HEAP SUMMARY:
==858958==     in use at exit: 4,096 bytes in 1 blocks
==858958==   total heap usage: 557 allocs, 556 frees, 12,992 bytes allocated
==858958== 
==858958== LEAK SUMMARY:
==858958==    definitely lost: 0 bytes in 0 blocks
==858958==    indirectly lost: 0 bytes in 0 blocks
==858958==      possibly lost: 0 bytes in 0 blocks
==858958==    still reachable: 4,096 bytes in 1 blocks
==858958==         suppressed: 0 bytes in 0 blocks
==858958== Rerun with --leak-check=full to see details of leaked memory
==858958== 
==858958== For lists of detected and suppressed errors, rerun with: -s
==858958== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Segmentation fault         (core dumped) ./vg-in-place
./none/tests/x86/sse4-x86.clang > /dev/null
$ 


So, IOW, seems like valgrind compiled with clang fails to interpret
none/tests/x86/sse4-x86 correctly.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to