[compiler-rt] r192677 - [ASan] Make test from r192581 Linux-only, as wild memory contents is less predictable on Mac

Alexey Samsonov samsonov at google.com
Tue Oct 15 00:54:27 PDT 2013


Author: samsonov
Date: Tue Oct 15 02:54:27 2013
New Revision: 192677

URL: http://llvm.org/viewvc/llvm-project?rev=192677&view=rev
Log:
[ASan] Make test from r192581 Linux-only, as wild memory contents is less predictable on Mac

Added:
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/heap-overflow-large.cc
      - copied unchanged from r192676, compiler-rt/trunk/lib/asan/lit_tests/TestCases/heap-overflow-large.cc
Removed:
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/heap-overflow-large.cc

Removed: compiler-rt/trunk/lib/asan/lit_tests/TestCases/heap-overflow-large.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/heap-overflow-large.cc?rev=192676&view=auto
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/heap-overflow-large.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/heap-overflow-large.cc (removed)
@@ -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;
-}





More information about the llvm-commits mailing list