[asan] relax HugeMallocTest so that it does not fail on small-RAM machines

llvm-svn: 196904
This commit is contained in:
Kostya Serebryany 2013-12-10 10:34:55 +00:00
parent 6d2c88eafd
commit b00a0e2971
1 changed files with 3 additions and 1 deletions

View File

@ -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__