Summary: | R15 may be uninitialized in x86_64/pthread_cond_timedwait.S | ||
---|---|---|---|
Product: | glibc | Reporter: | H.J. Lu <hjl.tools> |
Component: | nptl | Assignee: | Ulrich Drepper <drepper.fsp> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bugdal |
Priority: | P2 | Flags: | fweimer:
security-
|
Version: | 2.14 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
H.J. Lu
2011-10-28 16:45:41 UTC
This patch diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S index 1caba54..c3cfeec 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S @@ -112,6 +112,7 @@ __pthread_cond_timedwait: /* Get internal lock. */ movl $1, %esi + xorl %r15d, %r15d xorl %eax, %eax LOCK #if cond_lock == 0 works for me. Whose bright idea was it to write a separate version of these functions for each target architecture in asm, rather than just using common C code with underlying asm (or gcc intrinsics) for the atomic memory operations? I'm thinking of opening a bug "Gratuitous asm leads to arch-specific bugs in pthread synchronization primitives" so this and similar bugs can all be marked as a duplicate of it... I checked in a better patch. |