Fix assertion failure in libsanitizer when using glibc 2.31 and later.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92154
https://reviews.llvm.org/D69104
Adapted from these upstream revision:
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=277981
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=279653
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
index 97eae3fc7bc..4089d4695e2 100644
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -1145,8 +1145,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid);
CHECK_SIZE_AND_OFFSET(ipc_perm, gid);
CHECK_SIZE_AND_OFFSET(ipc_perm, cuid);
CHECK_SIZE_AND_OFFSET(ipc_perm, cgid);
-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)
-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */
+#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31)
+/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit
+ on many architectures. */
CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
#endif
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
index c139322839a..7c3c2d866e5 100644
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -211,20 +211,13 @@ namespace __sanitizer {
unsigned long __unused1;
unsigned long __unused2;
#elif defined(__sparc__)
-# if defined(__arch64__)
unsigned mode;
- unsigned short __pad1;
-# else
- unsigned short __pad1;
- unsigned short mode;
unsigned short __pad2;
-# endif
unsigned short __seq;
unsigned long long __unused1;
unsigned long long __unused2;
#else
- unsigned short mode;
- unsigned short __pad1;
+ unsigned int mode;
unsigned short __seq;
unsigned short __pad2;
#if defined(__x86_64__) && !defined(_LP64)
p
Age | Commit message (Expand) | Author |
2023-08-16 | Update email addresses for Juliana Sims....* .mailmap: Add an entry for Juliana.
* gnu/packages/admin.scm, gnu/packages/audio.scm,
gnu/packages/build-tools.scm, gnu/packages/scheme.scm: Update Juliana's email.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Juliana Sims |
2022-01-11 | Update mailmap....* .mailmap: Add entry for Zheng Junjie.
| Leo Famulari |
2021-11-06 | Update mailmap and copyright assignments for Liliana Marie Prikler....Use full names everywhere.
* .mailmap: Use full name for Liliana Marie Prikler.
* gnu/packages/zig.scm: Likewise.
| Liliana Marie Prikler |
2021-09-06 | Update mailmap....* .mailmap: Add entry for Liliana Marie Prikler.
| Liliana Marie Prikler |
2021-09-04 | Update mailmap....* .mailmap: Alias all my contributions to the same identity.
| Marius Bakke |
2021-07-27 | Update mailmap....* .mailmap: Add entry for Christine Lemmer-Webber.
| Leo Famulari |
2021-07-08 | mailmap: Update entries for Matthew James Kraai....* .mailmap: Change name for Matthew James Kraai.
* gnu/packages/lisp-xyz.scm, gnu/packages/python-xyz.scm,
gnu/packages/rust.scm: Likewise.
Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
| Matthew James Kraai |
2021-06-23 | gnu: Add Sollya....* gnu/packages/algebra.scm (sollya): New variable.
* .mailmap: Adjust "proper email" for `git commit`.
| Eric Bavier |
2021-04-21 | Update email address for Kei....* .mailmap: Remove obsolete email for Kei.
| Kei Kebreau |