Skip to content

Commit 9f9da27

Browse files
Tomasz Miąskotmiasko
Tomasz Miąsko
andauthored
Fix sanitizer-common build with glibc 2.31 (#47)
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 <[email protected]>
1 parent 027e428 commit 9f9da27

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc

+5-4
Original file line numberDiff line numberDiff line change
@@ -1127,10 +1127,11 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid);
11271127
CHECK_SIZE_AND_OFFSET(ipc_perm, gid);
11281128
CHECK_SIZE_AND_OFFSET(ipc_perm, cuid);
11291129
CHECK_SIZE_AND_OFFSET(ipc_perm, cgid);
1130-
#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)
1131-
/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */
1132-
CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
1133-
#endif
1130+
// This patch is no longer necessary on LLVM 10.
1131+
// #if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)
1132+
// /* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */
1133+
// CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
1134+
// #endif
11341135

11351136
CHECK_TYPE_SIZE(shmid_ds);
11361137
CHECK_SIZE_AND_OFFSET(shmid_ds, shm_perm);

0 commit comments

Comments
 (0)