public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug nptl/13358] New: R15 may be uninitialized in x86_64/pthread_cond_timedwait.S
Date: Fri, 28 Oct 2011 16:46:00 -0000	[thread overview]
Message-ID: <bug-13358-131@http.sourceware.org/bugzilla/> (raw)

http://sourceware.org/bugzilla/show_bug.cgi?id=13358

             Bug #: 13358
           Summary: R15 may be uninitialized in
                    x86_64/pthread_cond_timedwait.S
           Product: glibc
           Version: 2.14
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: hjl.tools@gmail.com
    Classification: Unclassified


When glibc is configured with --enable-kernel=2.6.38 on x86-64,
R15 may be uninitialized in x86_64/pthread_cond_timedwait.S
when called from nptl/tst-abstime.c. The backtrace is


Breakpoint 5, pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:50
50        pushq    %r12
(gdb) bt
#0  pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:50
#1  0x0040081d in main () at fixed.c:85
(gdb) 

and sequence is

(gdb) next
53        pushq    %r13
(gdb) 
56        pushq    %r14
(gdb) 
59        pushq    %r15
(gdb) 
[Thread 0xf7a42940 (LWP 2393) exited]
67        subq    $FRAME_SIZE, %rsp
(gdb) 
71        cmpq    $1000000000, 8(%rdx)
(gdb) 
72        movl    $EINVAL, %eax
(gdb) 
73        jae    48f
(gdb) 
93        CMP_LP    $-1, dep_mutex(%rdi)
(gdb) 
96        movq    %rdi, 8(%rsp)
(gdb) 
97        movq    %rsi, 16(%rsp)
(gdb) 
98        movq    %rdx, %r13
(gdb) 
100        je    22f
(gdb) 
101        mov    %RSI_LP, dep_mutex(%rdi)
(gdb) 
114        movl    $1, %esi
(gdb) 
115        xorl    %eax, %eax
(gdb) 
116        LOCK
(gdb) 
122        jnz    31f
(gdb) 
125    32:    movq    16(%rsp), %rdi
(gdb) 
126        xorl    %esi, %esi
(gdb) 
127        callq    __pthread_mutex_unlock_usercnt
(gdb) 
129        testl    %eax, %eax
(gdb) 
130        jne    46f
(gdb) 
132        movq    8(%rsp), %rdi
(gdb) 
133        incq    total_seq(%rdi)
(gdb) 
134        incl    cond_futex(%rdi)
(gdb) 
135        addl    $(1 << nwaiters_shift), cond_nwaiters(%rdi)
(gdb) 
138        movq    8(%rsp), %rdi
(gdb) 
139        movq    wakeup_seq(%rdi), %r9
(gdb) 
140        movl    broadcast_seq(%rdi), %edx
(gdb) 
141        movq    %r9, 24(%rsp)
(gdb) 
142        movl    %edx, 4(%rsp)
(gdb) 
144        cmpq    $0, (%r13)
(gdb) 
145        movq    $-ETIMEDOUT, %r14
(gdb) 
146        js    36f
(gdb) 
231    36:    movl    broadcast_seq(%rdi), %edx
(gdb) 
233        movq    woken_seq(%rdi), %rax
(gdb) 
235        movq    wakeup_seq(%rdi), %r9
(gdb) 
237        cmpl    4(%rsp), %edx
(gdb) 
238        jne    53f
(gdb) 
240        cmpq    24(%rsp), %r9
(gdb) 
241        jbe    45f
(gdb) 
246    45:    cmpq    $-ETIMEDOUT, %r14
(gdb) 
247        jne    38b
(gdb) 
249    99:    incq    wakeup_seq(%rdi)
(gdb) 
250        incl    cond_futex(%rdi)
(gdb) 
251        movl    $ETIMEDOUT, %r14d
(gdb) 
252        jmp    44f
(gdb) 
258    44:    incq    woken_seq(%rdi)
(gdb) 
260    54:    subl    $(1 << nwaiters_shift), cond_nwaiters(%rdi)
(gdb) 
263        cmpq    $0xffffffffffffffff, total_seq(%rdi)
(gdb) 
264        jne    55f
(gdb) 
286    55:    LOCK
(gdb) 
292        jne    40f
(gdb) 
296    41:    movq    16(%rsp), %rdi
(gdb) 

Breakpoint 6, pthread_cond_timedwait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:297
297        testl    %r15d, %r15d
(gdb)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


             reply	other threads:[~2011-10-28 16:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-28 16:46 hjl.tools at gmail dot com [this message]
2011-10-28 16:57 ` [Bug nptl/13358] " hjl.tools at gmail dot com
2011-10-29  0:22 ` bugdal at aerifal dot cx
2011-10-29 19:51 ` drepper.fsp at gmail dot com
2014-06-27 11:42 ` fweimer at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-13358-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).