This is the mail archive of the libc-alpha@sources.redhat.com 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]

[Felipe Contreras <al593181@mail.mty.itesm.mx>] bug in useldt.h



Hi glibc developers,

has anybody an idea what might be the problem?

Felipe reports:
> The program that failed: int main() { return 0; }
> 
> Compiled with: gcc tmp.c -o tmp -lpthread

He's using a selfcompiled glibc that and using the i686 LDT thread
implementation.

I can't reproduce this with current CVS sources.  Can anybody else
reproduce this or has anybody an idea what might be the problem?

Andreas

--- Begin Message ---
Topics:
   Re: bug in useldt.h
   Re: bug in useldt.h

--- End Message ---
--- Begin Message ---
I debuged the 'ls' that segfaults

The message:
============
0x4015954a in __pthread_alt_lock () from /lib/libpthread.so.0

The segfault comes here:
========================
0x4015954a <__pthread_alt_lock+26>:     mov    %gs:0x0,%eax

The gs register:
================
gs             0x0      0

The backtrace:
==============
#0  0x4015954a in __pthread_alt_lock () from /lib/libpthread.so.0
#1  0x401568d5 in pthread_mutex_lock () from /lib/libpthread.so.0
#2  0x4012ae23 in __register_frame_info (begin=0x40014c94, ob=0x0)
    at ../../gcc-2.95.3/gcc/frame.c:627
#3  0x400466c2 in init () from /lib/libc.so.6
#4  0x4000b797 in call_init () from /lib/ld-linux.so.2
#5  0x4000b8ee in _dl_init () from /lib/ld-linux.so.2

After that I remember I saw programs segfaulting only when they were linked to
'rt' and 'pthread', so I did a simple test program and compiled against those
libraries and it segfaulted.

After some tries linking with some libraries I found that the problem comes
when compiling against 'pthread'.

The program that failed: int main() { return 0; }

Compiled with: gcc tmp.c -o tmp -lpthread

Debugging it I found the same results. It runs on my normal system, but with
the new glibc it segfaults.

When runing the testsuite some tests failed, and all of the tests in
libpthreads failed.

_______________________________________________
Bug-glibc mailing list
Bug-glibc@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-glibc


--- End Message ---
--- Begin Message ---
On Thu, Dec 06, 2001 at 08:13:19AM +0100, Andreas Jaeger wrote:
> 
> Which Linux kernel are you using?

I tried it with 2.4.16 and 2.4.17-pre2. And I remember this happening
with other kernels.

> 
> Since you recompiled glibc yourself, did you run the testsuite with
> make check?

Yes, make check.


--- End Message ---

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

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