[Bug 2431] New: Crash in int10 module with linuxthreads/TLS glibc

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jan 31 07:27:05 PST 2005


Please do not reply to this email: if you want to comment on the bug, go to            
the URL shown below and enter yourcomments there.     
   
https://bugs.freedesktop.org/show_bug.cgi?id=2431          
     
           Summary: Crash in int10 module with linuxthreads/TLS glibc
           Product: xorg
           Version: 6.8.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: critical
          Priority: P3
         Component: DDX/xorg
        AssignedTo: xorg-bugzilla-noise at freedesktop.org
        ReportedBy: jsberg at bnl.gov


First of all, I have a bit of an unusual config, I think: 

Linux, kernel 2.4.29
glibc-2.3.4, built with
../glibc-2.3.4/configure " '--prefix=/usr'
'--enable-add-ons=linuxthreads,libidn' '--enable-kernel=2.4.18'
This means that glibc is built with linuxthreads and TLS.

Basically, the X server segfaults within the libint10.a code, or just after
(hard to tell, of course).

I tracked this down, and think I know what is going on.  The problem is that the
vm86old syscall which is executed by vm86_rep clobbers the gs segment register.
 But TLS (at least with linuxthreads) uses the gs register to keep track of
where the thread local storage is (which is evidently used even when you don't
use threads...).  Thus, the next time malloc is called, we segfault and die.  My
simple solution was to push the gs register before the int $0x80 call and
restore it after (gcc didn't seem to recognize the gs register for a clobber spec).

>From looking on Google, there is at least one other person with this same
problem, so my crazy configuration is not completely unique...          
     
     
--           
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
     
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the xorg-bugzilla-noise mailing list