[asan] Fix mmap_limit_mb test to not use C++11.

llvm-svn: 206182
This commit is contained in:
Evgeniy Stepanov
2014-04-14 15:37:02 +00:00
parent 681016b2ea
commit 81d80f7578

View File

@@ -1,6 +1,6 @@
// Test the mmap_limit_mb flag.
//
// RUN: %clangxx_asan -std=c++11 -O2 %s -o %t
// RUN: %clangxx_asan -O2 %s -o %t
// RUN: %t 100 16
// RUN: %t 100 1000000
// RUN: ASAN_OPTIONS=mmap_limit_mb=500 %t 100 16
@@ -22,7 +22,8 @@ int main(int argc, char **argv) {
std::vector<char *> v;
for (long total = total_mb << 20; total > 0; total -= allocation_size)
v.push_back(new char[allocation_size]);
for (auto p : v) delete[] p;
for (std::vector<char *>::const_iterator it = v.begin(); it != v.end(); ++it)
delete[](*it);
printf("PASS\n");
// CHECK: AddressSanitizer CHECK failed{{.*}}total_mmaped{{.*}}mmap_limit_mb
return 0;