bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

thread pointer problem on IPF


From: Stephane Eranian
Subject: thread pointer problem on IPF
Date: Wed, 11 Jun 2003 15:28:49 -0700
User-agent: Mutt/1.4.1i

Hello,

We think we have discovered a pthread-related problem with  glibc on 
IPF platforms. It seems that when the program is linked statically
the thread pointer (r13) is not initialized properly.

This bug is affecting is affecting RHAS2.1/IPF with glibc-2.2.4, 
Debian unstable/IPF running glibc-2.3.1-16, and Debian stable running 
glibc-2.2.5

The following test program, courtesy of David Mosberger, shows the problem.

Is this a know bug or are we missing something at compile time?

Thanks
------------------------------------------------------------------------------

On debian/stable:

 $ cat t.c
 int main (int argc, char **argv) {
  register unsigned long tp asm ("r13");
  printf ("tp=%lx\n", tp);
 }
 $ ls -l /lib/libc.so.6.1
 lrwxrwxrwx 1 root root 13 Oct  1  2002 /lib/libc.so.6.1 -> libc-2.2.5.so
 $ gcc t.c
 $ ./a.out
 tp=0
 $ gcc t.c -lpthread
 tp=2000000000084080
 $ gcc -static t.c -lpthread
 tp=0 <<<== wrong

On Debian NPTL-based glibc:

 $ gcc t.c
 $ ./a.out
 tp=20000000000436f0
 $ gcc t.c -lpthread
 $ ./a.out
 tp=2000000000043cd0
 $ gcc -static t.c -lpthread
 $ ./a.out
 tp=6000000000010430

-- 
-Stephane




reply via email to

[Prev in Thread] Current Thread [Next in Thread]