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 069d8d557de..c49c28c6e07 100644 --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc @@ -1130,8 +1130,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); #ifndef __GLIBC_PREREQ #define __GLIBC_PREREQ(x, y) 0 #endif -#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 304d04e3935..6dee89c97e1 100644 --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h @@ -207,20 +207,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) og/?id=d53f374a8a33fc018f37411b8bbde17fded3319b'>root/gnu/packages/dbm.scm
AgeCommit message (Expand)Author
2024-08-31gnu: dbm: Regenerate Autotools files....This way, overriding the 'detection of 'build' isn't needed anymore. * gnu/packages/dbm.scm (bdb-snippet): New procedure. (bdb-4.8)[source]: Add the snippet. [arguments]: Copy "config.sub"," "config.guess" and "install-sh" in a new 'boostrap phase', this time from automake. Move macros from aclocal_java to aclocal. Move configure flags to #:configure-flags. Remove 'configure' phase, instead add a pre-configure phase for adjusting Makefile.in and use '#:out-of-source' to perform an out-of-source build. Run "s_config" to fix up the version numbers. (bdb-5.3)[source]: Inherit from bdb-4.8's source, to get the snippet. (bdb-6)[source]: Likewise, and be careful to not add a patch. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Change-Id: I03aa7ed4afda15d970856efed9f14fd851ee7634 Maxime Devos