public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/64435] New: [5.0.0 Regression] Bootstrap failure in libsanitizer on AArch64 with Linux kernel <= 3.15
@ 2014-12-29 15:41 david.abdurachmanov at gmail dot com
  2014-12-29 18:21 ` [Bug sanitizer/64435] " david.abdurachmanov at gmail dot com
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: david.abdurachmanov at gmail dot com @ 2014-12-29 15:41 UTC (permalink / raw)
  To: gcc-bugs

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 <will.deacon@arm.com>
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 <will.deacon@arm.com>
    Acked-by: Arnd Bergmann <arnd@arndb.de>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>

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 <asm-generic/posix_types.h>
+
+#endif /*  __ASM_POSIX_TYPES_H */


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2015-01-26 15:18 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-29 15:41 [Bug sanitizer/64435] New: [5.0.0 Regression] Bootstrap failure in libsanitizer on AArch64 with Linux kernel <= 3.15 david.abdurachmanov at gmail dot com
2014-12-29 18:21 ` [Bug sanitizer/64435] " david.abdurachmanov at gmail dot com
2014-12-29 18:25 ` david.abdurachmanov at gmail dot com
2015-01-09 11:20 ` rguenth at gcc dot gnu.org
2015-01-09 11:54 ` david.abdurachmanov at gmail dot com
2015-01-13 11:24 ` [Bug sanitizer/64435] [5 " rguenth at gcc dot gnu.org
2015-01-13 15:45 ` jakub at gcc dot gnu.org
2015-01-13 21:17 ` clyon at gcc dot gnu.org
2015-01-18 12:38 ` jakub at gcc dot gnu.org
2015-01-18 19:07 ` david.abdurachmanov at gmail dot com
2015-01-18 19:11 ` jakub at gcc dot gnu.org
2015-01-18 19:37 ` pinskia at gcc dot gnu.org
2015-01-18 19:51 ` clyon at gcc dot gnu.org
2015-01-19  8:40 ` jakub at gcc dot gnu.org
2015-01-19 16:53 ` jakub at gcc dot gnu.org
2015-01-19 17:29 ` jakub at gcc dot gnu.org
2015-01-19 17:55 ` pinskia at gcc dot gnu.org
2015-01-19 17:56 ` jakub at gcc dot gnu.org
2015-01-19 18:01 ` jakub at gcc dot gnu.org
2015-01-19 18:33 ` jakub at gcc dot gnu.org
2015-01-19 20:13 ` clyon at gcc dot gnu.org
2015-01-19 21:49 ` jakub at gcc dot gnu.org
2015-01-20  8:10 ` jakub at gcc dot gnu.org
2015-01-20 16:53 ` kcc at gcc dot gnu.org
2015-01-21 21:22 ` jakub at gcc dot gnu.org
2015-01-21 22:09 ` jakub at gcc dot gnu.org
2015-01-26 15:18 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).