[LLVMbugs] [Bug 21476] New: sanitizer_platform_limits_posix.cc(git) build error in aarch64 platrom

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Nov 4 04:53:52 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=21476

            Bug ID: 21476
           Summary: sanitizer_platform_limits_posix.cc(git) build error in
                    aarch64 platrom
           Product: compiler-rt
           Version: unspecified
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: compiler-rt
          Assignee: unassignedbugs at nondot.org
          Reporter: yuxing.tang at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 13288
  --> http://llvm.org/bugs/attachment.cgi?id=13288&action=edit
the patch file for
compiler-rt/lib/sanitizer_common/santizer_platform_limits_posix.h

I got this problem during the build of llvm git source tree. Just during the
build of sanitizer_platform_limits_posix.cc.o in compiler-rt, the error rise
for wrong CHECK_TYPE_SIZE(__kernel_old_gid_t).

  after dig into the source code, I find in the line #472 in
sanitizer_platform_limits_posix.h has been changed since the end of September.
The aarch64 don't use "unsigned int" for __sanitizer__kernel_old_git_t, but
change to "unsigned shot".

  I just put this line back to the same as 3.5.0. The problem solved.

**** so the possible patch below **********
---
./llvmGIT/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
 2014-11-04 19:25:39.907146059 +0800
+++
./llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
 2014-11-04 17:08:34.903162640 +0800
@@ -472,7 +472,7 @@
   typedef long __sanitizer___kernel_off_t;
 #endif

-#if defined(__powerpc__) || defined(__mips__)
+#if defined(__powerpc__) || defined(__aarch64__) || defined(__mips__)
   typedef unsigned int __sanitizer___kernel_old_uid_t;
   typedef unsigned int __sanitizer___kernel_old_gid_t;
 #else

****************************************

**** the error message below ***********
[ 62%] Building CXX object
projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSan
itizerCommon.aarch64.dir/sanitizer_platform_limits_posix.cc.o
In file included from
/home/tyx/SourceCode/llvm/projects/compiler-rt/lib/sanitizer_co
mmon/sanitizer_platform_limits_posix.cc:178:0:
/home/xxx/SourceCode/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_interna
l_defs.h:274:72: error: size of array ‘assertion_failed__1008’ is negative
     typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]

...
...

/home/xxx/SourceCode/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platfor
m_limits_posix.cc:1009:1: note: in expansion of macro ‘CHECK_TYPE_SIZE’
 CHECK_TYPE_SIZE(__kernel_old_gid_t);
 ^
cc1plus: warning: unrecognized command line option "-Wno-c99-extensions"
[enabled by 
default]
cc1plus: warning: unrecognized command line option "-Wno-gnu" [enabled by
default]
make[2]: ***
[projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.
aarch64.dir/sanitizer_platform_limits_posix.cc.o] Error 1
make[1]: ***
[projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.
aarch64.dir/all] Error 2
make: *** [all] Error 2
***************************************

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141104/b40df54c/attachment.html>


More information about the llvm-bugs mailing list