glibc/valgrind incompatibility on POWER, potentially SCV-related

Florian Weimer fweimer@redhat.com
Mon Jan 4 19:57:37 GMT 2021


* Florian Weimer via Libc-alpha:

> 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.

It's SCV, confirmed by vgdb:

Dump of assembler code for function __GI__exit:
   0x0000000004995fa0 <+0>:     addis   r2,r12,18
   0x0000000004995fa4 <+4>:     addi    r2,r2,4448
   0x0000000004995fa8 <+8>:     mflr    r0
   0x0000000004995fac <+12>:    nop
   0x0000000004995fb0 <+16>:    std     r29,-24(r1)
   0x0000000004995fb4 <+20>:    std     r31,-8(r1)
   0x0000000004995fb8 <+24>:    ld      r9,-29584(r2)
   0x0000000004995fbc <+28>:    mr      r31,r3
   0x0000000004995fc0 <+32>:    std     r30,-16(r1)
   0x0000000004995fc4 <+36>:    add     r29,r9,r13
   0x0000000004995fc8 <+40>:    li      r30,-4096
   0x0000000004995fcc <+44>:    mr      r3,r31
   0x0000000004995fd0 <+48>:    std     r0,16(r1)
   0x0000000004995fd4 <+52>:    li      r0,234
   0x0000000004995fd8 <+56>:    ld      r9,-28776(r13)
   0x0000000004995fdc <+60>:    andis.  r9,r9,16
   0x0000000004995fe0 <+64>:    beq     0x4996034 <__GI__exit+148>
   0x0000000004995fe4 <+68>:    nop
   0x0000000004995fe8 <+72>:    nop
   0x0000000004995fec <+76>:    ori     r2,r2,0
=> 0x0000000004995ff0 <+80>:    scv     0

I filed: <https://bugs.kde.org/show_bug.cgi?id=431157>

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



More information about the Libc-alpha mailing list