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

Bug#735774: eglibc FTBFS on alpha: tls-macros and thunk unwind info fixes



Source: eglibc
Version: 2.17-97
Severity: Important
Tags: patch
User: debian-alpha@lists.debian.org
Usertags: alpha

eglibc 2.17 FTBFS on Alpha due to numerous segmentation violations and
failures in the test suite.

For the version in unstable two fixes are required: the attached patch
(which fixes the segfaults in the elf/tst-tls* tests) and commit
027e32bd42314e17095ba39df82ef293f4a72c09 (alpha: Fix signal thunk unwind
info) from glibc upstream (which fixes numerous other segfaults and
failures).

For the version in experimental (2.18) only the attached patch should be
necessary.

The glibc alpha maintainer is aware of the problem fixed in the attached
patch however has not yet committed a fix to glibc master.

Please also update
debian/testsuite-checking/expected-results-alpha-linux-gnu-libc
to contain:

annexc.out, Error 1 (ignored)
badsalttest.out, Error 1
run-conformtest.out, Error 1 (ignored)
test-double.out, Error 1
test-float.out, Error 1
test-ifloat.out, Error 1
tst-backtrace2.out, Error 1
tst-backtrace3.out, Error 1
tst-backtrace4.out, Error 1
tst-backtrace5.out, Error 1
tst-backtrace6.out, Error 1
tst-cpuclock2.out, Error 1
tst-cputimer3.out, Error 1
tst-eintr1.out, Error 1
tst-mqueue5.out, Error 1

Of the above the only one that is not present in lists for other arches is
badsalttest.out.  It occurs because strncmp reads one extra character past
what it should and I see that there is a patch applied for alpha to remove
the alpha specific implementation of a number of string functions (but not
strncmp) for this very reason.  I therefore wonder whether the removal of
the alpha specific implementation of strncmp should be included.  Thoughts?

In my build of eglibc-2.17-97+alpha just uploaded to debian-ports unreleased
I used exactly the same list of expected test suite failures as above for
debian/testsuite-checking/expected-results-alphaev67-linux-gnu-alphaev67,
however annexc.out was the only actual failure reported in the build log.

Cheers
Michael.
diff --git a/ports/sysdeps/alpha/tls-macros.h b/ports/sysdeps/alpha/tls-macros.h
index 0385d93..30b4ad3 100644
--- a/ports/sysdeps/alpha/tls-macros.h
+++ b/ports/sysdeps/alpha/tls-macros.h
@@ -4,19 +4,22 @@ extern void *__tls_get_addr (void *);
 
 # define TLS_GD(x)						\
   ({ void *__result;						\
-     asm ("lda %0, " #x "($gp) !tlsgd" : "=r" (__result));	\
+     register void *__gp asm ("$29");                           \
+     asm ("lda %0, " #x "(%1) !tlsgd" : "=r" (__result) : "r" (__gp));	\
      __tls_get_addr (__result); })
 
 # define TLS_LD(x)						\
   ({ void *__result;						\
-     asm ("lda %0, " #x "($gp) !tlsldm" : "=r" (__result));	\
+     register void *__gp asm ("$29");				\
+     asm ("lda %0, " #x "(%1) !tlsldm" : "=r" (__result) : "r" (__gp));	\
      __result = __tls_get_addr (__result);			\
      asm ("lda %0, " #x "(%0) !dtprel" : "+r" (__result));	\
      __result; })
 
 # define TLS_IE(x)						\
   ({ long ofs;							\
-     asm ("ldq %0, " #x "($gp) !gottprel" : "=r"(ofs));		\
+     register void *__gp asm ("$29");				\
+     asm ("ldq %0, " #x "(%1) !gottprel" : "=r"(ofs) : "r" (__gp));	\
      __builtin_thread_pointer () + ofs; })
 
 # define TLS_LE(x)						\

Reply to: