This is the mail archive of the glibc-bugs@sourceware.org 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]

[Bug nptl/6577] New: SPARC64 get/setcontext smashes TLS


(I'm not sure that this is libc's fault so apologies in advance if this is 
noise and should be redirected.  Please don't hesitate to ask for additional 
information; I'm not sure what else I should provide.)

Doing a setcontext() on Linux/SPARC64 (kernel 2.6.26-rc4) using glibc 2.7 
(Debian build 2.7-11) also writes over %g7, which is used to store the TLS 
pointer for pthread_self() (see libc/nptl/sysdeps/sparc/tls.h).  This breaks 
plan9port's libthread but it will show up any time threads exchange or pool 
contexts.

I've worked around it by manually setting uc_mcontext.mc_gregs[REG_G7] to 
pthread_self() before calling setcontext; if this is the correct fix, it would 
seem that setcontext() should be doing that itself.

Thanks for your time.

-- 
           Summary: SPARC64 get/setcontext smashes TLS
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
        AssignedTo: drepper at redhat dot com
        ReportedBy: nwfilardo at gmail dot com
                CC: glibc-bugs at sources dot redhat dot com
  GCC host triplet: sparc-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=6577

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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