From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7122 invoked by alias); 29 Dec 2014 15:41:29 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 7035 invoked by uid 48); 29 Dec 2014 15:41:24 -0000 From: "david.abdurachmanov at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/64435] New: [5.0.0 Regression] Bootstrap failure in libsanitizer on AArch64 with Linux kernel <= 3.15 Date: Mon, 29 Dec 2014 15:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: david.abdurachmanov at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-12/txt/msg02867.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64435 Bug ID: 64435 Summary: [5.0.0 Regression] Bootstrap failure in libsanitizer on AArch64 with Linux kernel <= 3.15 Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: david.abdurachmanov at gmail dot com 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 I finally started testing GCC trunk (5.0.0) on AArch64 before release is made. I quickly find out that I couldn't bootstrap GCC on APM Mustang board with APM Linux images (F19 + 3.12 kernel), but it worked fine with QEMU + F21 + 3.17 kernel). Failure details are below. The culprit is 34c65c43f1518bf85f93526ad373adc6a683b4c5 from Linux repository. Commit details are provided below. Simply put __sanitizer___kernel_{uid,gid}_t depends on kernel version. <=3.15 it's unsigned int and >=3.16 it's unsigned short. ##### GCC trunk failure ##### In file included from ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:176:0: ../../../../libsanitizer/sanitizer_common/sanitizer_internal_defs.h:272:72: error: size of array 'assertion_failed__1006' is negative typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1] ^ ../../../../libsanitizer/sanitizer_common/sanitizer_internal_defs.h:266: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:1285:3: note: in expansion of macro 'COMPILER_CHECK' COMPILER_CHECK(sizeof(__sanitizer_##TYPE) == sizeof(TYPE)) ^ ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:1006:1: note: in expansion of macro 'CHECK_TYPE_SIZE' CHECK_TYPE_SIZE(__kernel_old_uid_t); ^ ../../../../libsanitizer/sanitizer_common/sanitizer_internal_defs.h:272: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:266: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:1285:3: note: in expansion of macro 'COMPILER_CHECK' COMPILER_CHECK(sizeof(__sanitizer_##TYPE) == sizeof(TYPE)) ^ ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:1007:1: note: in expansion of macro 'CHECK_TYPE_SIZE' CHECK_TYPE_SIZE(__kernel_old_gid_t); ^ make[4]: *** [sanitizer_platform_limits_posix.lo] Error 1 make[4]: *** Waiting for unfinished jobs.... ##### Linux Commit ##### commit 34c65c43f1518bf85f93526ad373adc6a683b4c5 Author: Will Deacon Date: Mon Jun 2 11:47:29 2014 +0100 arm64: uid16: fix __kernel_old_{gid,uid}_t definitions Whilst native arm64 applications don't have the 16-bit UID/GID syscalls wired up, compat tasks can still access them. The 16-bit wrappers for these syscalls use __kernel_old_uid_t and __kernel_old_gid_t, which must be 16-bit data types to maintain compatibility with the 16-bit UIDs used by compat applications. This patch defines 16-bit __kernel_old_{gid,uid}_t types for arm64 instead of using the 32-bit types provided by asm-generic. Signed-off-by: Will Deacon Acked-by: Arnd Bergmann Cc: Signed-off-by: Catalin Marinas diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild index 42c7eec..0b3fcf8 100644 --- a/arch/arm64/include/asm/Kbuild +++ b/arch/arm64/include/asm/Kbuild @@ -30,7 +30,6 @@ generic-y += msgbuf.h generic-y += mutex.h generic-y += pci.h generic-y += poll.h -generic-y += posix_types.h generic-y += preempt.h generic-y += resource.h generic-y += rwsem.h diff --git a/arch/arm64/include/uapi/asm/posix_types.h b/arch/arm64/include/uapi/asm/posix_types.h new file mode 100644 index 0000000..7985ff6 --- /dev/null +++ b/arch/arm64/include/uapi/asm/posix_types.h @@ -0,0 +1,10 @@ +#ifndef __ASM_POSIX_TYPES_H +#define __ASM_POSIX_TYPES_H + +typedef unsigned short __kernel_old_uid_t; +typedef unsigned short __kernel_old_gid_t; +#define __kernel_old_uid_t __kernel_old_uid_t + +#include + +#endif /* __ASM_POSIX_TYPES_H */