summaryrefslogtreecommitdiff
path: root/lib/asan/tests/asan_test.cc
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2013-12-10 10:34:55 +0000
committerKostya Serebryany <kcc@google.com>2013-12-10 10:34:55 +0000
commit72323c99788d95c12f6af0388c8379ceb4cc688d (patch)
tree86e47ab9308f81e797cad797a45f03464c7e9c80 /lib/asan/tests/asan_test.cc
parentbd5b5f148a0f25b0cc8096f6565faa956ea7b678 (diff)
[asan] relax HugeMallocTest so that it does not fail on small-RAM machines
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@196904 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/tests/asan_test.cc')
-rw-r--r--lib/asan/tests/asan_test.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/asan/tests/asan_test.cc b/lib/asan/tests/asan_test.cc
index 43a850ba2..af7c47188 100644
--- a/lib/asan/tests/asan_test.cc
+++ b/lib/asan/tests/asan_test.cc
@@ -301,7 +301,9 @@ TEST(AddressSanitizer, LargeMallocTest) {
TEST(AddressSanitizer, HugeMallocTest) {
if (SANITIZER_WORDSIZE != 64 || ASAN_AVOID_EXPENSIVE_TESTS) return;
size_t n_megs = 4100;
- TestLargeMalloc(n_megs << 20);
+ EXPECT_DEATH(Ident((char*)malloc(n_megs << 20))[-1] = 0,
+ "is located 1 bytes to the left|"
+ "AddressSanitizer failed to allocate");
}
#ifndef __APPLE__