[llvm-commits] [compiler-rt] r171036 - in /compiler-rt/trunk/lib: asan/tests/asan_noinst_test.cc sanitizer_common/tests/sanitizer_allocator_test.cc
Kostya Serebryany
kcc at google.com
Mon Dec 24 06:53:14 PST 2012
Author: kcc
Date: Mon Dec 24 08:53:13 2012
New Revision: 171036
URL: http://llvm.org/viewvc/llvm-project?rev=171036&view=rev
Log:
[sanitizer] fix gcc warnings, enable one tests under asan_allocator2
Modified:
compiler-rt/trunk/lib/asan/tests/asan_noinst_test.cc
compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_test.cc
Modified: compiler-rt/trunk/lib/asan/tests/asan_noinst_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_noinst_test.cc?rev=171036&r1=171035&r2=171036&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_noinst_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_noinst_test.cc Mon Dec 24 08:53:13 2012
@@ -717,8 +717,6 @@
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++) {
Modified: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_test.cc?rev=171036&r1=171035&r2=171036&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_test.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_test.cc Mon Dec 24 08:53:13 2012
@@ -291,7 +291,7 @@
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 @@
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]);
}
}
More information about the llvm-commits
mailing list