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

Alexey Samsonov vonosmas at gmail.com
Tue Dec 23 12:05:32 PST 2014


OK, this patch is getting closer to commit-ready state. However, I'd still ask Dmitry to review / sign this off.

What is the main reason of unexpected failures in test?


REPOSITORY
  rL LLVM

================
Comment at: lib/tsan/CMakeLists.txt:86
@@ +85,3 @@
+    else()
+      set(TSAN_ASM_SOURCES "")
+    endif()
----------------
  set(TSAN_ASM_SOURCES)

================
Comment at: lib/tsan/rtl/tsan_platform.h:135
@@ +134,3 @@
+#if SANITIZER_CAN_USE_ALLOCATOR64
+  return kHeapMemEnd + SizeClassAllocator64<kHeapMemBeg, kHeapMemEnd -
+                                            kHeapMemBeg, 0, DefaultSizeClassMap>
----------------
No, please don't copy-paste this code around. You can move this function to tsan_rtl.h, where allocator is defined.

================
Comment at: lib/tsan/rtl/tsan_rtl.cc:331
@@ -328,1 +330,3 @@
 #endif
+  // For MIPS, Initialize () is called from __interceptor_memset () which is
+  // called from __pthread_initialize_minimal_internal ().
----------------
You can shorten the comment and tell that on MIPS TSan initialization is run before `__pthread_initialize_minimal_internal()` is finished, so we can't spawn new threads.

http://reviews.llvm.org/D6291

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






More information about the llvm-commits mailing list