[PATCH] [TSan][MIPS] Adding support for MIPS64
Alexey Samsonov
vonosmas at gmail.com
Wed Nov 19 13:32:08 PST 2014
================
Comment at: lib/tsan/CMakeLists.txt:103
@@ -102,1 +102,3 @@
+if(CAN_TARGET_mips64 AND UNIX AND NOT APPLE)
+ set(arch "mips64")
----------------
Please merge this into x86_64 case somehow.
================
Comment at: lib/tsan/rtl/tsan_interceptors.cc:44
@@ +43,3 @@
+const int kSigCount = 128;
+bool guard_aquired;
+#else
----------------
acquired (here and below)
================
Comment at: lib/tsan/rtl/tsan_interceptors.cc:661
@@ +660,3 @@
+#ifdef __mips__
+ // For mips memset gets called before a call to __cxa_guard_aquire
+ // which causes a crash in REAL(pthread_create) during initialization
----------------
I don't understand this comment. Why does REAL(pthread_create) crash?
================
Comment at: lib/tsan/rtl/tsan_interface_atomic.cc:43
@@ -42,3 +42,3 @@
#ifndef TSAN_GO
// Protects emulation of 128-bit atomic operations.
----------------
use
#if !defined(TSAN_GO) && defined(__SIZEOF_INT128__)
Or, better, fix this macro definition in Clang.
================
Comment at: lib/tsan/rtl/tsan_platform_linux.cc:318
@@ -314,2 +317,3 @@
continue;
+#if SANITIZER_CAN_USE_ALLOCATOR64
if (p >= kHeapMemEnd &&
----------------
Please reduce the amount of #ifs here (e.g. introduce a helper function).
http://reviews.llvm.org/D6291
More information about the llvm-commits
mailing list