[compiler-rt] r196374 - [asan] revert 196373: committed to many files by mistake

Kostya Serebryany kcc at google.com
Wed Dec 4 02:47:15 PST 2013


Author: kcc
Date: Wed Dec  4 04:47:14 2013
New Revision: 196374

URL: http://llvm.org/viewvc/llvm-project?rev=196374&view=rev
Log:
[asan] revert 196373: committed to many files by mistake

Modified:
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/heavy_uar_test.cc
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/stack-buffer-overflow-with-position.cc
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/stack-use-after-return.cc
    compiler-rt/trunk/lib/asan/tests/asan_test.cc
    compiler-rt/trunk/lib/asan/tests/asan_test_utils.h

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/heavy_uar_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/heavy_uar_test.cc?rev=196374&r1=196373&r2=196374&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/heavy_uar_test.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/heavy_uar_test.cc Wed Dec  4 04:47:14 2013
@@ -47,8 +47,8 @@ int main(int argc, char **argv) {
   RecuriveFunctionWithStackFrame<1024>(10);
   stale_stack[100]++;
   // CHECK: ERROR: AddressSanitizer: stack-use-after-return on address
-  // CHECK: is located in stack of thread T0 at offset {{116|132}} in frame
+  // CHECK: is located in stack of thread T0 at offset 132 in frame
   // CHECK:  in LeakStack(){{.*}}heavy_uar_test.cc:
-  // CHECK: [{{16|32}}, {{1040|1056}}) 'x'
+  // CHECK: [32, 1056) 'x'
   return 0;
 }

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/stack-buffer-overflow-with-position.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/stack-buffer-overflow-with-position.cc?rev=196374&r1=196373&r2=196374&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/stack-buffer-overflow-with-position.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/stack-buffer-overflow-with-position.cc Wed Dec  4 04:47:14 2013
@@ -5,14 +5,15 @@
 // RUN: %t 8
 // RUN: not %t 9  2>&1 | FileCheck --check-prefix=CHECK-9  %s
 // RUN: not %t 10 2>&1 | FileCheck --check-prefix=CHECK-10 %s
-// RUN: not %t 30 2>&1 | FileCheck --check-prefix=CHECK-30 %s
-// RUN: not %t 31 2>&1 | FileCheck --check-prefix=CHECK-31 %s
-// RUN: not %t 41 2>&1 | FileCheck --check-prefix=CHECK-41 %s
-// RUN: not %t 42 2>&1 | FileCheck --check-prefix=CHECK-42 %s
 // RUN: not %t 62 2>&1 | FileCheck --check-prefix=CHECK-62 %s
 // RUN: not %t 63 2>&1 | FileCheck --check-prefix=CHECK-63 %s
+// RUN: not %t 63 2>&1 | FileCheck --check-prefix=CHECK-63 %s
 // RUN: not %t 73 2>&1 | FileCheck --check-prefix=CHECK-73 %s
 // RUN: not %t 74 2>&1 | FileCheck --check-prefix=CHECK-74 %s
+// RUN: not %t 126 2>&1 | FileCheck --check-prefix=CHECK-126 %s
+// RUN: not %t 127 2>&1 | FileCheck --check-prefix=CHECK-127 %s
+// RUN: not %t 137 2>&1 | FileCheck --check-prefix=CHECK-137 %s
+// RUN: not %t 138 2>&1 | FileCheck --check-prefix=CHECK-138 %s
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -30,15 +31,15 @@ int main(int argc, char **argv) {
   // make sure BBB and CCC are not removed;
   return *(short*)(p) + BBB[argc % 2] + CCC[argc % 2];
 }
-// CHECK-m2: 'AAA' <== {{.*}}underflows this variable
-// CHECK-m1: 'AAA' <== {{.*}}partially underflows this variable
-// CHECK-9:  'AAA' <== {{.*}}partially overflows this variable
-// CHECK-10: 'AAA' <== {{.*}}overflows this variable
-// CHECK-30: 'BBB' <== {{.*}}underflows this variable
-// CHECK-31: 'BBB' <== {{.*}}partially underflows this variable
-// CHECK-41: 'BBB' <== {{.*}}partially overflows this variable
-// CHECK-42: 'BBB' <== {{.*}}overflows this variable
-// CHECK-62: 'CCC' <== {{.*}}underflows this variable
-// CHECK-63: 'CCC' <== {{.*}}partially underflows this variable
-// CHECK-73: 'CCC' <== {{.*}}partially overflows this variable
-// CHECK-74: 'CCC' <== {{.*}}overflows this variable
+// CHECK-m2:  'AAA' <== Memory access at offset 30 underflows this variable
+// CHECK-m1:  'AAA' <== Memory access at offset 31 partially underflows this variable
+// CHECK-9:   'AAA' <== Memory access at offset 41 partially overflows this variable
+// CHECK-10:  'AAA' <== Memory access at offset 42 overflows this variable
+// CHECK-62:  'BBB' <== Memory access at offset 94 underflows this variable
+// CHECK-63:  'BBB' <== Memory access at offset 95 partially underflows this variable
+// CHECK-73:  'BBB' <== Memory access at offset 105 partially overflows this variable
+// CHECK-74:  'BBB' <== Memory access at offset 106 overflows this variable
+// CHECK-126: 'CCC' <== Memory access at offset 158 underflows this variable
+// CHECK-127: 'CCC' <== Memory access at offset 159 partially underflows this variable
+// CHECK-137: 'CCC' <== Memory access at offset 169 partially overflows this variable
+// CHECK-138: 'CCC' <== Memory access at offset 170 overflows this variable

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/stack-use-after-return.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/stack-use-after-return.cc?rev=196374&r1=196373&r2=196374&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/stack-use-after-return.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/stack-use-after-return.cc Wed Dec  4 04:47:14 2013
@@ -51,11 +51,11 @@ void Func2(char *x) {
   // CHECK: WRITE of size 1 {{.*}} thread T0
   // CHECK:     #0{{.*}}Func2{{.*}}stack-use-after-return.cc:[[@LINE-2]]
   // CHECK: is located in stack of thread T0 at offset
-  // CHECK: 'local' <== Memory access at offset {{16|32}} is inside this variable
+  // CHECK: 'local' <== Memory access at offset 32 is inside this variable
   // THREAD: WRITE of size 1 {{.*}} thread T{{[1-9]}}
   // THREAD:     #0{{.*}}Func2{{.*}}stack-use-after-return.cc:[[@LINE-6]]
   // THREAD: is located in stack of thread T{{[1-9]}} at offset
-  // THREAD: 'local' <== Memory access at offset {{16|32}} is inside this variable
+  // THREAD: 'local' <== Memory access at offset 32 is inside this variable
   // CHECK-20: T0: FakeStack created:{{.*}} stack_size_log: 20
   // CHECK-24: T0: FakeStack created:{{.*}} stack_size_log: 24
 }

Modified: compiler-rt/trunk/lib/asan/tests/asan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?rev=196374&r1=196373&r2=196374&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test.cc Wed Dec  4 04:47:14 2013
@@ -452,14 +452,12 @@ NOINLINE void SizedStackTest() {
   for (size_t i = 0; i < kSize; i++)
     A[i] = i;
   EXPECT_DEATH(A[-1] = 0, "");
-  EXPECT_DEATH(A[-5] = 0, "");
-  if (kSize > 16)
-    EXPECT_DEATH(A[-31] = 0, "");
+  EXPECT_DEATH(A[-20] = 0, "");
+  EXPECT_DEATH(A[-31] = 0, "");
   EXPECT_DEATH(A[kSize] = 0, "");
   EXPECT_DEATH(A[kSize + 1] = 0, "");
-  EXPECT_DEATH(A[kSize + 5] = 0, "");
-  if (kSize > 16)
-    EXPECT_DEATH(A[kSize + 31] = 0, "");
+  EXPECT_DEATH(A[kSize + 10] = 0, "");
+  EXPECT_DEATH(A[kSize + 31] = 0, "");
 }
 
 TEST(AddressSanitizer, SimpleStackTest) {
@@ -671,8 +669,7 @@ TEST(AddressSanitizer, ThreadStackReuseT
   PTHREAD_JOIN(t, 0);
 }
 
-#if defined(__i686__) || defined(__x86_64__)
-#include <emmintrin.h>
+#if defined(__i386__) || defined(__x86_64__)
 TEST(AddressSanitizer, Store128Test) {
   char *a = Ident((char*)malloc(Ident(12)));
   char *p = a;

Modified: compiler-rt/trunk/lib/asan/tests/asan_test_utils.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test_utils.h?rev=196374&r1=196373&r2=196374&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test_utils.h (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test_utils.h Wed Dec  4 04:47:14 2013
@@ -41,6 +41,10 @@
 #include <unistd.h>
 #endif
 
+#if defined(__i386__) || defined(__x86_64__)
+#include <emmintrin.h>
+#endif
+
 #ifndef __APPLE__
 #include <malloc.h>
 #endif





More information about the llvm-commits mailing list