[compiler-rt] r178876 - [asan] make huge_negative_hea_oob more meaningful

Kostya Serebryany kcc at google.com
Fri Apr 5 08:16:48 PDT 2013


Author: kcc
Date: Fri Apr  5 10:16:48 2013
New Revision: 178876

URL: http://llvm.org/viewvc/llvm-project?rev=178876&view=rev
Log:
[asan] make huge_negative_hea_oob more meaningful

Modified:
    compiler-rt/trunk/lib/asan/lit_tests/huge_negative_hea_oob.cc

Modified: compiler-rt/trunk/lib/asan/lit_tests/huge_negative_hea_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/huge_negative_hea_oob.cc?rev=178876&r1=178875&r2=178876&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/huge_negative_hea_oob.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/huge_negative_hea_oob.cc Fri Apr  5 10:16:48 2013
@@ -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;
 }





More information about the llvm-commits mailing list