[compiler-rt] r375220 - [Arm][libsanitizer] Fix arm libsanitizer failure with bleeding edge glibc

Sjoerd Meijer via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 04:01:45 PDT 2019


Author: sjoerdmeijer
Date: Fri Oct 18 04:01:45 2019
New Revision: 375220

URL: http://llvm.org/viewvc/llvm-project?rev=375220&view=rev
Log:
[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

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp?rev=375220&r1=375219&r2=375220&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp Fri Oct 18 04:01:45 2019
@@ -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
 




More information about the llvm-commits mailing list