From 9f9da27fbdb0ba7d887f8d2521e082f12b009417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mi=C4=85sko?= Date: Tue, 7 Apr 2020 17:52:51 +0200 Subject: [PATCH] Fix sanitizer-common build with glibc 2.31 (#47) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The type of ipc_perm mode field used by sanitizers is inconsistent with one found in glibc 2.31, resulting in a test failure during build. The sanitizers don't actually use the field directly and only care about the size and alignment of the whole structure. Disable the field check until the upgrade to LLVM 10 which addresses the issue in more comprehensive way. Co-authored-by: Tomasz Miąsko --- .../sanitizer_common/sanitizer_platform_limits_posix.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc index 690c602d7d6862..e9c1b1a84a2728 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc @@ -1127,10 +1127,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) -/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ -CHECK_SIZE_AND_OFFSET(ipc_perm, mode); -#endif +// This patch is no longer necessary on LLVM 10. +// #if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) +// /* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ +// CHECK_SIZE_AND_OFFSET(ipc_perm, mode); +// #endif CHECK_TYPE_SIZE(shmid_ds); CHECK_SIZE_AND_OFFSET(shmid_ds, shm_perm);