From 54d87ffe4b34052f159ac5b72b250129ce813b2a Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 14 Feb 2020 12:33:27 +0100 Subject: [PATCH] backport: re PR sanitizer/92154 (new glibc breaks arm bootstrap due to libsanitizer) Backported from mainline 2019-10-22 Tamar Christina PR sanitizer/92154 * sanitizer_common/sanitizer_platform_limits_posix.cc: Cherry-pick compiler-rt revision r375220. --- --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc @@ -1147,8 +1147,12 @@ 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) +#if (!defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)) && \ + !defined(__arm__) /* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ +/* On Arm glibc 2.31 and later provide a different mode field, this field is + never used by libsanitizer so we can simply ignore this assert for all glibc + versions. */ CHECK_SIZE_AND_OFFSET(ipc_perm, mode); #endif -- 2.25.2