When I build compiler-rt with clang 3.2, all lsan tests pass. The only failing tests I see are in ubsan:
Failing Tests (6):
UndefinedBehaviorSanitizer :: Float/cast-overflow.cpp
UndefinedBehaviorSanitizer :: Integer/add-overflow.cpp
UndefinedBehaviorSanitizer :: Integer/div-zero.cpp
UndefinedBehaviorSanitizer :: Integer/sub-overflow.cpp
UndefinedBehaviorSanitizer :: Integer/uadd-overflow.cpp
UndefinedBehaviorSanitizer :: Integer/usub-overflow.cpp
When I build with gcc 4.4.3, I need the changes below to get the source to compile (and then the lsan tests fails). What are you all using to build compiler-rt? are you developing on linux, osx or windows? Using gcc or llvm? Which should I expect to work? Any buildbots running?
And lastly, are there build instructions to build the Android shared object? Is there any way to build an android static lib? How about for arm-linux?
Thanks,
Greg
diff --git a/lib/interception/interception.h b/lib/interception/interception.h
index d50af35…1771d4e 100644
— a/lib/interception/interception.h
+++ b/lib/interception/interception.h
@@ -27,8 +27,8 @@ typedef __sanitizer::uptr SIZE_T;
typedef __sanitizer::sptr SSIZE_T;
typedef __sanitizer::sptr PTRDIFF_T;
typedef __sanitizer::s64 INTMAX_T;
-typedef __sanitizer::OFF_T OFF_T;
-typedef __sanitizer::OFF64_T OFF64_T;
+//typedef __sanitizer::OFF_T OFF_T;
+//typedef __sanitizer::OFF64_T OFF64_T;
// How to add an interceptor:
// Suppose you need to wrap/replace system function (generally, from libc):
diff --git a/lib/lsan/lsan_allocator.cc b/lib/lsan/lsan_allocator.cc
index 9bf27b1…190dce8 100644
— a/lib/lsan/lsan_allocator.cc
+++ b/lib/lsan/lsan_allocator.cc
@@ -43,7 +43,7 @@ typedef CombinedAllocator<PrimaryAllocator, AllocatorCache,
Allocator;
static Allocator allocator;
-static THREADLOCAL AllocatorCache cache;
+static /THREADLOCAL/ AllocatorCache cache;
void InitializeAllocator() {
allocator.Init();
diff --git a/lib/msan/msan_allocator.cc b/lib/msan/msan_allocator.cc
index 7435843…3e6adb6 100644
— a/lib/msan/msan_allocator.cc
+++ b/lib/msan/msan_allocator.cc
@@ -33,7 +33,7 @@ typedef LargeMmapAllocator<> SecondaryAllocator;
typedef CombinedAllocator<PrimaryAllocator, AllocatorCache,
Allocator;
-static THREADLOCAL AllocatorCache cache;
+static /THREADLOCAL/ AllocatorCache cache;
static Allocator allocator;
static int inited = 0;