Bug 5465

Summary: glibc-2.7 uses vdso symbol in pthread_cond_timedwait when !SHARED
Product: glibc Reporter: Mike Frysinger <vapier>
Component: nptlAssignee: Ulrich Drepper <drepper.fsp>
Status: RESOLVED FIXED    
Severity: normal CC: glibc-bugs, spock, toolchain
Priority: P2 Flags: fweimer: security-
Version: unspecified   
Target Milestone: ---   
Host: x86_64-linux-gnu Target:
Build: Last reconfirmed:
Attachments: glibc-libpthread-x86-64-vdso-SHARED.patch

Description Mike Frysinger 2007-12-10 01:31:56 UTC
nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S was updated to call
clock_gettime via the VDSO if possible, but that vdso symbol is only provided
for SHARED code (see libc/sysdeps/unix/sysv/linux/x86_64/init-first.c).  thus,
linking against libpthread.a and using pthread_cond_timedwait() on x86_64 will
cause a link failure (undefined __vdso_clock_gettime symbol).

the attached patch by Michal Januszewski will only use the vdso symbol when
SHARED is defined.
Comment 1 Mike Frysinger 2007-12-10 01:32:41 UTC
Created attachment 2131 [details]
glibc-libpthread-x86-64-vdso-SHARED.patch
Comment 2 Ulrich Drepper 2007-12-12 08:07:52 UTC
Patch is in cvs.