sylvestre.ledru created this revision.
sylvestre.ledru added a reviewer: atanasyan.
Herald added subscribers: llvm-commits, Sanitizers, jdoerfert, delcypher, 
arichardson, dberris, kubamracek, sdardis.
Herald added projects: LLVM, Sanitizers.
sylvestre.ledru added a comment.

Not sure what I am doing but it fixes the issue


Fails with:

/<<BUILDDIR>>/llvm-toolchain-8-8~+rc5/projects/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:343:72:
 error: size of array 'assertion_failed__73' is negative

  typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
                                                                     ^

/<<BUILDDIR>>/llvm-toolchain-8-8~+rc5/projects/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:337:30:
 note: in expansion of macro 'IMPL_COMPILER_ASSERT'

  #define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
                              ^~~~~~~~~~~~~~~~~~~~

/<<BUILDDIR>>/llvm-toolchain-8-8~+rc5/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc:73:1:
 note: in expansion of macro 'COMPILER_CHECK'

  COMPILER_CHECK(struct_kernel_stat_sz == sizeof(struct stat));


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D59702

Files:
  lib/sanitizer_common/sanitizer_platform_limits_linux.cc
  lib/sanitizer_common/sanitizer_platform_limits_posix.h


Index: lib/sanitizer_common/sanitizer_platform_limits_posix.h
===================================================================
--- lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -81,7 +81,7 @@
 #elif defined(__mips__)
   const unsigned struct_kernel_stat_sz =
                  SANITIZER_ANDROID ? FIRST_32_SECOND_64(104, 128) :
-                                     FIRST_32_SECOND_64(160, 216);
+                                     FIRST_32_SECOND_64(144, 104);
   const unsigned struct_kernel_stat64_sz = 104;
 #elif defined(__s390__) && !defined(__s390x__)
   const unsigned struct_kernel_stat_sz = 64;
Index: lib/sanitizer_common/sanitizer_platform_limits_linux.cc
===================================================================
--- lib/sanitizer_common/sanitizer_platform_limits_linux.cc
+++ lib/sanitizer_common/sanitizer_platform_limits_linux.cc
@@ -28,7 +28,7 @@
 // are not defined anywhere in userspace headers. Fake them. This seems to work
 // fine with newer headers, too.
 #include <linux/posix_types.h>
-#if defined(__x86_64__) ||  defined(__mips__)
+#if defined(__x86_64__)
 #include <sys/stat.h>
 #else
 #define ino_t __kernel_ino_t


Index: lib/sanitizer_common/sanitizer_platform_limits_posix.h
===================================================================
--- lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -81,7 +81,7 @@
 #elif defined(__mips__)
   const unsigned struct_kernel_stat_sz =
                  SANITIZER_ANDROID ? FIRST_32_SECOND_64(104, 128) :
-                                     FIRST_32_SECOND_64(160, 216);
+                                     FIRST_32_SECOND_64(144, 104);
   const unsigned struct_kernel_stat64_sz = 104;
 #elif defined(__s390__) && !defined(__s390x__)
   const unsigned struct_kernel_stat_sz = 64;
Index: lib/sanitizer_common/sanitizer_platform_limits_linux.cc
===================================================================
--- lib/sanitizer_common/sanitizer_platform_limits_linux.cc
+++ lib/sanitizer_common/sanitizer_platform_limits_linux.cc
@@ -28,7 +28,7 @@
 // are not defined anywhere in userspace headers. Fake them. This seems to work
 // fine with newer headers, too.
 #include <linux/posix_types.h>
-#if defined(__x86_64__) ||  defined(__mips__)
+#if defined(__x86_64__)
 #include <sys/stat.h>
 #else
 #define ino_t __kernel_ino_t
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to