This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH v2] PR sanitizer/78992: Fix sigaction definition on 32-bit sparc
- From: James Clarke <jrtc27 at jrtc27 dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: James Clarke <jrtc27 at jrtc27 dot com>, Jakub Jelinek <jakub at redhat dot com>
- Date: Tue, 10 Jan 2017 13:19:32 +0000
- Subject: [PATCH v2] PR sanitizer/78992: Fix sigaction definition on 32-bit sparc
- Authentication-results: sourceware.org; auth=none
- References: <20170104210513.GP21933@tucnak>
libsanitizer:
PR sanitizer/78992
* sanitizer_common/sanitizer_platform_limits_posix.h
(struct __sanitizer_sigaction): Cherry-pick upstream r291561.
---
libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
index 066bf41ffef..c139322839a 100644
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -633,9 +633,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;
--
2.11.0