summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjoerd Meijer <sjoerd.meijer@arm.com>2019-10-18 11:01:45 +0000
committerSjoerd Meijer <sjoerd.meijer@arm.com>2019-10-18 11:01:45 +0000
commit749af53928a31afa3111f27cc41fd15849d86667 (patch)
tree1ad0345fba7485fd4eed1b554473cec918b74085
parent6e86c1660cd0c8f0af4575b41f83150a560d3941 (diff)
downloadcompiler-rt-749af53928a31afa3111f27cc41fd15849d86667.tar.gz
[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
-rw-r--r--lib/sanitizer_common/sanitizer_platform_limits_posix.cpp5
1 files changed, 4 insertions, 1 deletions
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