Ian Lance Taylor <i...@google.com> writes: > Rainer Orth <r...@cebitec.uni-bielefeld.de> writes: > >> All tests hang with the default -test.timeout=240. > > Thanks for providing access to a Solaris system. > > Right now it looks like there is a bug, or at least an incompatibility, > in the 64-bit versions of getcontext and setcontext. It looks like > calling setcontext on the 32-bit version does not change the value of > TLS variables, which is also the case on GNU/Linux. In the 64-bit > version, calling setcontext does change the value of TLS variables. > That is, on the 64-bit version, getcontext preserves the value of TLS > variables and setcontext restores the old value. (Of course it's really > the pointer, not the TLS variables themselves). This incompatibility > has to be a bug, and of course I would prefer that the incompatibility > be resolved in favor of the implementation used on GNU/Linux. > > Here is a program which shows the issue. Compile with -pthread. With > -m32 it prints go1: tls == 2. With -m64 it prints go1: tls == 1. The > program is too complex for the problem, but it does show the issue.
Thanks for the detective work. I'll try to find in the OpenSolaris sources what's going on, at the same time contacting the Solaris engineers about the issue. There's more to the problem, though: on Solaris/SPARC (mayon is a Solaris 11 machine you could use here), both 32 and 64-bit versions of the test program print tls == 2, but many (not all) libgo tests still fail. I also tried the program on IRIX 6.5 (columba, dog slow unfortunately), which doesn't have native TLS. It doesn't go beyond the go1: tls == 2 line, and I had to reduce the stack sizes to 32 MB to allow it to run at all. On Tru64 UNIX (haydn), also using emutls, it does run until the i == 0 line, but doesn't finish. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University