[PATCH] [TSan][MIPS] Adding support for MIPS64

Sagar Thakur Sagar.Thakur at imgtec.com
Tue Dec 23 04:50:36 PST 2014


> What is the status of check-tsan command with these changes applied?


  Expected Passes    : 159
  Expected Failures  : 1
  Unsupported Tests  : 1
  Unexpected Failures: 15


REPOSITORY
  rL LLVM

================
Comment at: lib/tsan/rtl/tsan_interface_atomic.cc:36
@@ -35,3 +35,3 @@
 #if !defined(SANITIZER_GO) && (defined(__SIZEOF_INT128__) \
-    || (__clang_major__ * 100 + __clang_minor__ >= 302))
+    && (__clang_major__ * 100 + __clang_minor__ >= 302))
 __extension__ typedef __int128 a128;
----------------
samsonov wrote:
> This change is wrong - it won't work if you build TSan runtime with GCC. Why do you need it?
We have not yet implemented 128-bit operations for mips as of clang version 3.6.0. We need to disable `__TSAN_HAS_INT128` because tsan fails to compile with the use of 128-bit atomic operations. I have changed this to disable `__TSAN_HAS_INT128` only for mips64.

================
Comment at: lib/tsan/rtl/tsan_platform_linux.cc:218
@@ +217,3 @@
+#if defined(__mips64)
+  madvise((void*)MemToShadow(0xff00000000ULL),
+      0x100000000ULL * kShadowMultiplier, MADV_NOHUGEPAGE);
----------------
samsonov wrote:
> Where do these magic numbers come from? Please use a named constant for them.
If I understand correctly this address range is part of high application memory which is used for thread stack and large user mmaps.

http://reviews.llvm.org/D6291

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list