From 749af53928a31afa3111f27cc41fd15849d86667 Mon Sep 17 00:00:00 2001 From: Sjoerd Meijer Date: Fri, 18 Oct 2019 11:01:45 +0000 Subject: [Arm][libsanitizer] Fix arm libsanitizer failure with bleeding edge glibc Glibc has recently introduced changed to the mode field in ipc_perm in commit 2f959dfe849e0646e27403f2e4091536496ac0f0. For Arm this means that the mode field no longer has the same size. This causes an assert failure against libsanitizer's internal copy of ipc_perm. Since this change can't be easily detected I am adding arm to the list of targets that are excluded from this check. Patch by: Tamar Christina Differential Revision: https://reviews.llvm.org/D69104 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@375220 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/sanitizer_common/sanitizer_platform_limits_posix.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp index 84058c708..9852e6ba7 100644 --- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp @@ -1128,8 +1128,11 @@ 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 newer glibc provide a different mode field, it's hard to detect + so just disable the check. */ CHECK_SIZE_AND_OFFSET(ipc_perm, mode); #endif -- cgit v1.2.1