summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2013-04-05 15:16:48 +0000
committerKostya Serebryany <kcc@google.com>2013-04-05 15:16:48 +0000
commit5ef2920d1f2e273f06e7dc512cbae5a9043ce21a (patch)
tree03ba3ee0fb229075c638d06bcf184b503d31875b
parentd26a01e14a38a37c742fbd676efc99a6b7eea1e6 (diff)
downloadcompiler-rt-5ef2920d1f2e273f06e7dc512cbae5a9043ce21a.tar.gz
[asan] make huge_negative_hea_oob more meaningful
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178876 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/asan/lit_tests/huge_negative_hea_oob.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/asan/lit_tests/huge_negative_hea_oob.cc b/lib/asan/lit_tests/huge_negative_hea_oob.cc
index bc71b644f..a09e3bf87 100644
--- a/lib/asan/lit_tests/huge_negative_hea_oob.cc
+++ b/lib/asan/lit_tests/huge_negative_hea_oob.cc
@@ -1,4 +1,5 @@
-// RUN: %clangxx_asan -m64 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -m64 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -m64 -O %s -o %t && %t 2>&1 | FileCheck %s
// Check that we can find huge buffer overflows to the left.
#include <stdlib.h>
#include <string.h>
@@ -7,4 +8,6 @@ int main(int argc, char **argv) {
memset(x, 0, 10);
int res = x[-argc * 4000]; // BOOOM
// CHECK: is located 4000 bytes to the left of
+ free(x);
+ return res;
}