[compiler-rt] r291561 - [sanitizer] Fix sigaction definition on 32-bit sparc

Maxim Ostapenko via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 10 04:41:19 PST 2017


Author: chefmax
Date: Tue Jan 10 06:41:18 2017
New Revision: 291561

URL: http://llvm.org/viewvc/llvm-project?rev=291561&view=rev
Log:
[sanitizer] Fix sigaction definition on 32-bit sparc

Patch by James Clarke.

Differential Revision: https://reviews.llvm.org/D28309

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h?rev=291561&r1=291560&r2=291561&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h Tue Jan 10 06:41:18 2017
@@ -635,9 +635,12 @@ namespace __sanitizer {
 #ifndef __mips__
 #if defined(__sparc__)
 #if __GLIBC_PREREQ (2, 20)
-    // On sparc glibc 2.19 and earlier sa_flags was unsigned long, and
-    // __glibc_reserved0 didn't exist.
+    // On sparc glibc 2.19 and earlier sa_flags was unsigned long.
+#if defined(__arch64__)
+    // To maintain ABI compatibility on sparc64 when switching to an int,
+    // __glibc_reserved0 was added.
     int __glibc_reserved0;
+#endif
     int sa_flags;
 #else
     unsigned long sa_flags;




More information about the llvm-commits mailing list