diff options
| -rw-r--r-- | compiler-rt/test/asan/TestCases/mmap_limit_mb.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler-rt/test/asan/TestCases/mmap_limit_mb.cc b/compiler-rt/test/asan/TestCases/mmap_limit_mb.cc index 92c114127e0..f3aafe9ec49 100644 --- a/compiler-rt/test/asan/TestCases/mmap_limit_mb.cc +++ b/compiler-rt/test/asan/TestCases/mmap_limit_mb.cc @@ -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; |

