https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71445
Bug ID: 71445 Summary: libsanitizer build failure on aarch64-linux-gnu with recent glibc Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: yroux at gcc dot gnu.org CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org Target Milestone: --- Recent changes in Glibc to follow POSIX specifications for both msghdr and cmsghdr (switch from size_t to sockelen_t for msg_iovlen, msg_controllen, and cmsg_len on 64-bits arch.), libsanitizer fails to build for AArch64 (logs at the end), and I guess other 64-bits targets. This issue was fixed in compiler-rt sources at revision 272008: http://llvm.org/viewvc/llvm-project?view=revision&revision=272008 For information Glibc revision which introduced the issue is: https://sourceware.org/git/?p=glibc.git;a=commit;h=222c2d7f4357d66073176f3beec67af40f0486c7 Full log of the failure: .../libsanitizer/sanitizer_common/sanitizer_internal_defs.h:254:72: error: size of array 'assertion_failed__1007' is negative typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1] ^ .../libsanitizer/sanitizer_common/sanitizer_internal_defs.h:248:30: note: in expansion of macro 'IMPL_COMPILER_ASSERT' #define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__) ^~~~~~~~~~~~~~~~~~~~ .../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1410:3: note: in expansion of macro 'COMPILER_CHECK' COMPILER_CHECK(sizeof(((__sanitizer_##CLASS *) NULL)->MEMBER) == \ ^~~~~~~~~~~~~~ .../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:1007:1: note: in expansion of macro 'CHECK_SIZE_AND_OFFSET' CHECK_SIZE_AND_OFFSET(msghdr, msg_iovlen); ^~~~~~~~~~~~~~~~~~~~~ .../libsanitizer/sanitizer_common/sanitizer_internal_defs.h:254:72: error: size of array 'assertion_failed__1009' is negative typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1] ^ .../libsanitizer/sanitizer_common/sanitizer_internal_defs.h:248:30: note: in expansion of macro 'IMPL_COMPILER_ASSERT' #define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__) ^~~~~~~~~~~~~~~~~~~~ .../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1410:3: note: in expansion of macro 'COMPILER_CHECK' COMPILER_CHECK(sizeof(((__sanitizer_##CLASS *) NULL)->MEMBER) == \ ^~~~~~~~~~~~~~ .../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:1009:1: note: in expansion of macro 'CHECK_SIZE_AND_OFFSET' CHECK_SIZE_AND_OFFSET(msghdr, msg_controllen); ^~~~~~~~~~~~~~~~~~~~~ .../libsanitizer/sanitizer_common/sanitizer_internal_defs.h:254:72: error: size of array 'assertion_failed__1013' is negative typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1] ^ .../libsanitizer/sanitizer_common/sanitizer_internal_defs.h:248:30: note: in expansion of macro 'IMPL_COMPILER_ASSERT' #define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__) ^~~~~~~~~~~~~~~~~~~~ .../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1410:3: note: in expansion of macro 'COMPILER_CHECK' COMPILER_CHECK(sizeof(((__sanitizer_##CLASS *) NULL)->MEMBER) == \ ^~~~~~~~~~~~~~ .../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:1013:1: note: in expansion of macro 'CHECK_SIZE_AND_OFFSET' CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len); ^~~~~~~~~~~~~~~~~~~~~