This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/17033] New: [x86_64] conditional cfi_undefined missing right after clone()


https://sourceware.org/bugzilla/show_bug.cgi?id=17033

            Bug ID: 17033
           Summary: [x86_64] conditional cfi_undefined missing right after
                    clone()
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: minor
          Priority: P2
         Component: nptl
          Assignee: unassigned at sourceware dot org
          Reporter: jan.kratochvil at redhat dot com
                CC: drepper.fsp at gmail dot com
            Target: x86_64-linux-gnu

gdb ~/t/thread2 -ex 'set confirm no' -ex 'set pagination off' -ex 'catch
syscall clone' -ex r -ex 'set $x=$pc' -ex 'delete 1' -ex start -ex 'b *$x' -ex
c -ex 'thread 2' -ex bt -ex 'stepi 3' -ex bt

Actual:
#0  clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:81
81        testq    %rax,%rax
(gdb) bt
#0  clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:81
#1  0x0000003722607e70 in ?? () at pthread_create.c:173
#2  0x00007ffff7fd6700 in ?? ()
#3  0x0000000000000000 in ?? ()
(gdb) _
+
clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:93
93        xorl    %ebp, %ebp
(gdb) bt
#0  clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:93
(gdb) _

Expected:
#0  clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:81
81        testq    %rax,%rax
(gdb) bt
#0  clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:81
(gdb) _
+
clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:93
93        xorl    %ebp, %ebp
(gdb) bt
#0  clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:93
(gdb) _

------------------------------------------------------------------------------
These lines are bogus unwind in child thread which is missing cfi_undefined:
#1  0x0000003722607e70 in ?? () at pthread_create.c:173
#2  0x00007ffff7fd6700 in ?? ()
#3  0x0000000000000000 in ?? ()

sysdeps/unix/sysv/linux/x86_64/clone.S
        /* End FDE now, because in the child the unwind info will be
           wrong.  */
        cfi_endproc;
        syscall
<--- Here is missing CFI which does %rax comparison + conditional cfi_undefined
        testq   %rax,%rax
        jl      SYSCALL_ERROR_LABEL
        jz      L(thread_start)

        ret

L(thread_start):
        cfi_startproc;
        /* Clearing frame pointer is insufficient, use CFI.  */
        cfi_undefined (rip);

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]