diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-01-07 19:55:37 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-01-07 19:55:37 +0000 |
commit | ca9211ecdede9bdedb812b2243a4abdb8dacd1b9 (patch) | |
tree | 9b19e801150082c33e9152275829a6ce90614b55 /lib/asan/lit_tests/TestCases/Linux/heap-overflow-large.cc | |
parent | 8ef50bf3d1c287b5013c3168de77a462dfce3495 (diff) |
Diffstat (limited to 'lib/asan/lit_tests/TestCases/Linux/heap-overflow-large.cc')
-rw-r--r-- | lib/asan/lit_tests/TestCases/Linux/heap-overflow-large.cc | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/asan/lit_tests/TestCases/Linux/heap-overflow-large.cc b/lib/asan/lit_tests/TestCases/Linux/heap-overflow-large.cc deleted file mode 100644 index 67e9c3718d59e..0000000000000 --- a/lib/asan/lit_tests/TestCases/Linux/heap-overflow-large.cc +++ /dev/null @@ -1,23 +0,0 @@ -// Regression test for -// https://code.google.com/p/address-sanitizer/issues/detail?id=183 - -// RUN: %clangxx_asan -O2 %s -o %t -// RUN: not %t 12 2>&1 | FileCheck %s -// RUN: not %t 100 2>&1 | FileCheck %s -// RUN: not %t 10000 2>&1 | FileCheck %s - -#include <stdlib.h> -#include <string.h> - -int main(int argc, char *argv[]) { - int *x = new int[5]; - memset(x, 0, sizeof(x[0]) * 5); - int index = atoi(argv[1]); - int res = x[index]; - // CHECK: AddressSanitizer: {{(heap-buffer-overflow|SEGV)}} - // CHECK: #0 0x{{.*}} in main {{.*}}heap-overflow-large.cc:[[@LINE-2]] - // CHECK: AddressSanitizer can not {{(provide additional info|describe address in more detail \(wild memory access suspected\))}} - // CHECK: SUMMARY: AddressSanitizer: {{(heap-buffer-overflow|SEGV)}} - delete[] x; - return res; -} |