PR sanitizer/67899 is a bootstrap failure on sparc-linux, caused by a
compilation error in libsanitizer.

The root cause is that `struct sigaction' has changed layout in glibc
twice recently, first an unintended ABI change in glibc-2.20, and then
the correction in glibc-2.22 (backported to the .20 and .21 branches).
(See glibc bz#18694).  Around the time of the first change, libsanitizer
was changed to match, but it wasn't updated for the correction.  The end
result is an ABI mismatch and assertion errors during compilation of
libsanitizer.  (The sa_flags field is of the wrong size and at the wrong
offset.)

Fixed by adjusting the SPARC part of libsanitizer's sigaction struct
to match glibc (except for the broken .20 and .21 initial releases).

Tested w/o regressions on sparc-linux-gnu (post-2.20 glibc), x86_64-linux-gnu,
powerpc-linux-gnu, armv7l-linux-gnueabi, and m68k-linux-gnu.

Is this Ok for trunk and 5/6 branches?

(Note: I don't have commit rights so if this is approved I would need
help to get it applied.)

Thanks,

/Mikael


libsanitizer/

2016-09-12  Mikael Pettersson  <mikpeli...@gmail.com>

        PR sanitizer/67899
        * sanitizer_common/sanitizer_platform_limits_posix.h
        (__sanitizer_sigaction): Adjust for sparc targets.

--- 
gcc-7-20160911/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h.~1~
  2015-11-23 10:07:18.000000000 +0100
+++ 
gcc-7-20160911/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h  
    2016-09-12 18:34:21.446379317 +0200
@@ -606,11 +606,10 @@ namespace __sanitizer {
 #else
     __sanitizer_sigset_t sa_mask;
 #ifndef __mips__
-#if defined(__sparc__)
-    unsigned long sa_flags;
-#else
-    int sa_flags;
+#if defined(__sparc__) && defined(__arch64__)
+    int __glibc_reserved0;
 #endif
+    int sa_flags;
 #endif
 #endif
 #if SANITIZER_LINUX

Reply via email to