diff options
author | Kostya Serebryany <kcc@google.com> | 2012-12-24 14:53:13 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2012-12-24 14:53:13 +0000 |
commit | db3250b8b30ce01cde7b4e63deb0cd85fc348ad9 (patch) | |
tree | 3c0816446b74fd5a1cd2c1ec279d29d2fad6534e | |
parent | fc7de2910c236b7010a508ab0db3d879a98e8691 (diff) | |
download | bcm5719-llvm-db3250b8b30ce01cde7b4e63deb0cd85fc348ad9.tar.gz bcm5719-llvm-db3250b8b30ce01cde7b4e63deb0cd85fc348ad9.zip |
[sanitizer] fix gcc warnings, enable one tests under asan_allocator2
llvm-svn: 171036
-rw-r--r-- | compiler-rt/lib/asan/tests/asan_noinst_test.cc | 2 | ||||
-rw-r--r-- | compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/compiler-rt/lib/asan/tests/asan_noinst_test.cc b/compiler-rt/lib/asan/tests/asan_noinst_test.cc index 13ac7a94c8e..575dfd23002 100644 --- a/compiler-rt/lib/asan/tests/asan_noinst_test.cc +++ b/compiler-rt/lib/asan/tests/asan_noinst_test.cc @@ -717,8 +717,6 @@ TEST(AddressSanitizerInterface, SetErrorReportCallbackTest) { TEST(AddressSanitizerInterface, GetOwnershipStressTest) { std::vector<char *> pointers; std::vector<size_t> sizes; - if (ASAN_ALLOCATOR_VERSION == 2 && SANITIZER_WORDSIZE == 32) - return; // FIXME: this is too slow. const size_t kNumMallocs = (SANITIZER_WORDSIZE <= 32 || ASAN_LOW_MEMORY) ? 1 << 10 : 1 << 14; for (size_t i = 0; i < kNumMallocs; i++) { diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc b/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc index 1a4122bff8b..117282108ac 100644 --- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc +++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc @@ -291,7 +291,7 @@ TEST(SanitizerCommon, LargeMmapAllocator) { uptr max_alignment = SANITIZER_WORDSIZE == 64 ? (1 << 28) : (1 << 24); for (uptr alignment = 8; alignment <= max_alignment; alignment *= 2) { const uptr kNumAlignedAllocs = 100; - for (int i = 0; i < kNumAlignedAllocs; i++) { + for (uptr i = 0; i < kNumAlignedAllocs; i++) { uptr size = ((i % 10) + 1) * 4096; char *p = allocated[i] = (char *)a.Allocate(size, alignment); CHECK_EQ(p, a.GetBlockBegin(p)); @@ -300,7 +300,7 @@ TEST(SanitizerCommon, LargeMmapAllocator) { CHECK_EQ(0, (uptr)allocated[i] % alignment); p[0] = p[size - 1] = 0; } - for (int i = 0; i < kNumAlignedAllocs; i++) { + for (uptr i = 0; i < kNumAlignedAllocs; i++) { a.Deallocate(allocated[i]); } } |