[compiler-rt] r341739 - [hwasan] rename two .cc tests into .c

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 7 18:27:10 PDT 2018


Author: kcc
Date: Fri Sep  7 18:27:10 2018
New Revision: 341739

URL: http://llvm.org/viewvc/llvm-project?rev=341739&view=rev
Log:
[hwasan] rename two .cc tests into .c

Added:
    compiler-rt/trunk/test/hwasan/TestCases/stack-oob.c
      - copied, changed from r341738, compiler-rt/trunk/test/hwasan/TestCases/stack-oob.cc
    compiler-rt/trunk/test/hwasan/TestCases/stack-uar.c
      - copied, changed from r341738, compiler-rt/trunk/test/hwasan/TestCases/stack-uar.cc
Removed:
    compiler-rt/trunk/test/hwasan/TestCases/stack-oob.cc
    compiler-rt/trunk/test/hwasan/TestCases/stack-uar.cc

Copied: compiler-rt/trunk/test/hwasan/TestCases/stack-oob.c (from r341738, compiler-rt/trunk/test/hwasan/TestCases/stack-oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/hwasan/TestCases/stack-oob.c?p2=compiler-rt/trunk/test/hwasan/TestCases/stack-oob.c&p1=compiler-rt/trunk/test/hwasan/TestCases/stack-oob.cc&r1=341738&r2=341739&rev=341739&view=diff
==============================================================================
--- compiler-rt/trunk/test/hwasan/TestCases/stack-oob.cc (original)
+++ compiler-rt/trunk/test/hwasan/TestCases/stack-oob.c Fri Sep  7 18:27:10 2018
@@ -1,6 +1,6 @@
-// RUN: %clangxx_hwasan -DSIZE=16 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_hwasan -DSIZE=64 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_hwasan -DSIZE=0x1000 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
+// RUN: %clang_hwasan -DSIZE=16 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
+// RUN: %clang_hwasan -DSIZE=64 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
+// RUN: %clang_hwasan -DSIZE=0x1000 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
 
 // REQUIRES: stable-runtime
 
@@ -17,7 +17,7 @@ int f() {
 int main() {
   return f();
   // CHECK: READ of size 1 at
-  // CHECK: #0 {{.*}} in f{{.*}}stack-oob.cc:14
+  // CHECK: #0 {{.*}} in f{{.*}}stack-oob.c:14
 
   // CHECK: is located in stack of threa
 

Removed: compiler-rt/trunk/test/hwasan/TestCases/stack-oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/hwasan/TestCases/stack-oob.cc?rev=341738&view=auto
==============================================================================
--- compiler-rt/trunk/test/hwasan/TestCases/stack-oob.cc (original)
+++ compiler-rt/trunk/test/hwasan/TestCases/stack-oob.cc (removed)
@@ -1,25 +0,0 @@
-// RUN: %clangxx_hwasan -DSIZE=16 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_hwasan -DSIZE=64 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_hwasan -DSIZE=0x1000 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// REQUIRES: stable-runtime
-
-#include <stdlib.h>
-#include <sanitizer/hwasan_interface.h>
-
-__attribute__((noinline))
-int f() {
-  char z[SIZE];
-  char *volatile p = z;
-  return p[SIZE];
-}
-
-int main() {
-  return f();
-  // CHECK: READ of size 1 at
-  // CHECK: #0 {{.*}} in f{{.*}}stack-oob.cc:14
-
-  // CHECK: is located in stack of threa
-
-  // CHECK: SUMMARY: HWAddressSanitizer: tag-mismatch {{.*}} in f
-}

Copied: compiler-rt/trunk/test/hwasan/TestCases/stack-uar.c (from r341738, compiler-rt/trunk/test/hwasan/TestCases/stack-uar.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/hwasan/TestCases/stack-uar.c?p2=compiler-rt/trunk/test/hwasan/TestCases/stack-uar.c&p1=compiler-rt/trunk/test/hwasan/TestCases/stack-uar.cc&r1=341738&r2=341739&rev=341739&view=diff
==============================================================================
--- compiler-rt/trunk/test/hwasan/TestCases/stack-uar.cc (original)
+++ compiler-rt/trunk/test/hwasan/TestCases/stack-uar.c Fri Sep  7 18:27:10 2018
@@ -1,4 +1,4 @@
-// RUN: %clangxx_hwasan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
+// RUN: %clang_hwasan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
 
 // REQUIRES: stable-runtime
 
@@ -15,7 +15,7 @@ char *f() {
 int main() {
   return *f();
   // CHECK: READ of size 1 at
-  // CHECK: #0 {{.*}} in main{{.*}}stack-uar.cc:16
+  // CHECK: #0 {{.*}} in main{{.*}}stack-uar.c:16
 
   // CHECK: is located in stack of thread
 

Removed: compiler-rt/trunk/test/hwasan/TestCases/stack-uar.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/hwasan/TestCases/stack-uar.cc?rev=341738&view=auto
==============================================================================
--- compiler-rt/trunk/test/hwasan/TestCases/stack-uar.cc (original)
+++ compiler-rt/trunk/test/hwasan/TestCases/stack-uar.cc (removed)
@@ -1,23 +0,0 @@
-// RUN: %clangxx_hwasan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// REQUIRES: stable-runtime
-
-#include <stdlib.h>
-#include <sanitizer/hwasan_interface.h>
-
-__attribute__((noinline))
-char *f() {
-  char z[0x1000];
-  char *volatile p = z;
-  return p;
-}
-
-int main() {
-  return *f();
-  // CHECK: READ of size 1 at
-  // CHECK: #0 {{.*}} in main{{.*}}stack-uar.cc:16
-
-  // CHECK: is located in stack of thread
-
-  // CHECK: SUMMARY: HWAddressSanitizer: tag-mismatch {{.*}} in main
-}




More information about the llvm-commits mailing list