public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* glibc/valgrind incompatibility on POWER, potentially SCV-related
@ 2021-01-04 19:36 Florian Weimer
  2021-01-04 19:57 ` Florian Weimer
  2021-01-04 21:39 ` Mark Wielaard
  0 siblings, 2 replies; 4+ messages in thread
From: Florian Weimer @ 2021-01-04 19:36 UTC (permalink / raw)
  To: Mark Wielaard
  Cc: Matheus Castanho, Tulio Magno Quites Machado Filho, libc-alpha

Does this look familiar?

+ /builddir/build/BUILDROOT/glibc-2.32.9000-24.fc34.ppc64le/lib64/ld-2.32.9000.so --library-path /builddir/build/BUILDROOT/glibc-2.32.9000-24.fc34.ppc64le/lib64 /usr/bin/valgrind --error-exitcode=1 /builddir/build/BUILDROOT/glibc-2.32.9000-24.fc34.ppc64le/lib64/ld-2.32.9000.so --library-path /builddir/build/BUILDROOT/glibc-2.32.9000-24.fc34.ppc64le/lib64 /usr/bin/true
==3891888== Memcheck, a memory error detector
==3891888== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==3891888== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==3891888== Command: /builddir/build/BUILDROOT/glibc-2.32.9000-24.fc34.ppc64le/lib64/ld-2.32.9000.so --library-path /builddir/build/BUILDROOT/glibc-2.32.9000-24.fc34.ppc64le/lib64 /usr/bin/true
==3891888== 
dis_syslink(ppc)(theInstr)
disInstr(ppc): unhandled instruction: 0x44000001
                 primary 17(0x11), secondary 1(0x1)
==3891888== valgrind: Unrecognised instruction at address 0x4999f80.
==3891888==    at 0x4999F80: _Exit (in /builddir/build/BUILDROOT/glibc-2.32.9000-24.fc34.ppc64le/lib64/libc-2.32.9000.so)
==3891888==    by 0x48ED76B: __run_exit_handlers (in /builddir/build/BUILDROOT/glibc-2.32.9000-24.fc34.ppc64le/lib64/libc-2.32.9000.so)
==3891888==    by 0x48C9FBB: generic_start_main.constprop.0.isra.0 (in /builddir/build/BUILDROOT/glibc-2.32.9000-24.fc34.ppc64le/lib64/libc-2.32.9000.so)
==3891888==    by 0x48CA19F: (below main) (in /builddir/build/BUILDROOT/glibc-2.32.9000-24.fc34.ppc64le/lib64/libc-2.32.9000.so)
==3891888== Your program just tried to execute an instruction that Valgrind
==3891888== did not recognise.  There are two possible reasons for this.
==3891888== 1. Your program has a bug and erroneously jumped to a non-code
==3891888==    location.  If you are running Memcheck and you just saw a
==3891888==    warning about a bad jump, it's probably your program's fault.
==3891888== 2. The instruction is legitimate but Valgrind doesn't handle it,
==3891888==    i.e. it's Valgrind's fault.  If you think this is the case or
==3891888==    you are not sure, please let us know and we'll try to fix it.
==3891888== Either way, Valgrind will now raise a SIGILL signal which will
==3891888== probably kill your program.
==3891888== 
==3891888== Process terminating with default action of signal 4 (SIGILL): dumping core
==3891888==  Illegal opcode at address 0x4999F80
==3891888==    at 0x4999F80: _Exit (in /builddir/build/BUILDROOT/glibc-2.32.9000-24.fc34.ppc64le/lib64/libc-2.32.9000.so)
==3891888==    by 0x48ED76B: __run_exit_handlers (in /builddir/build/BUILDROOT/glibc-2.32.9000-24.fc34.ppc64le/lib64/libc-2.32.9000.so)
==3891888==    by 0x48C9FBB: generic_start_main.constprop.0.isra.0 (in /builddir/build/BUILDROOT/glibc-2.32.9000-24.fc34.ppc64le/lib64/libc-2.32.9000.so)
==3891888==    by 0x48CA19F: (below main) (in /builddir/build/BUILDROOT/glibc-2.32.9000-24.fc34.ppc64le/lib64/libc-2.32.9000.so)
==3891888== 
==3891888== HEAP SUMMARY:
==3891888==     in use at exit: 0 bytes in 0 blocks
==3891888==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==3891888== 
==3891888== All heap blocks were freed -- no leaks are possible
==3891888== 
==3891888== For lists of detected and suppressed errors, rerun with: -s

I will try to get the exact object file.

My guess it's the SCV instruction, introduced by:

commit 68ab82f56690ada86ac1e0c46bad06ba189a10ef
Author: Matheus Castanho <msc@linux.ibm.com>
Date:   Thu Dec 3 14:15:27 2020 -0300

    powerpc: Runtime selection between sc and scv for syscalls

The immediate fix would be to mask PPC_FEATURE2_SCV in hwcap2.

Shouldn't valgrind conservatively mask everything?

Thanks,
Florian
-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-04 21:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04 19:36 glibc/valgrind incompatibility on POWER, potentially SCV-related Florian Weimer
2021-01-04 19:57 ` Florian Weimer
2021-01-04 21:39 ` Mark Wielaard
2021-01-04 21:50   ` Carl Love

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).