[PATCH] D69104: [Arm][libsanitizer] Fix arm libsanitizer failure with bleeding edge glibc

Tamar Christina via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 17 05:07:22 PDT 2019


tnfchris created this revision.
tnfchris added a reviewer: kcc.
Herald added subscribers: llvm-commits, Sanitizers, kristof.beyls.
Herald added projects: Sanitizers, LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69104

Files:
  compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp


Index: compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
===================================================================
--- compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
+++ compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
@@ -1128,8 +1128,11 @@
 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
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69104.225405.patch
Type: text/x-patch
Size: 853 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191017/d692b2e1/attachment.bin>


More information about the llvm-commits mailing list