[compiler-rt] r196375 - [asan] require __i686__ for the SSE test; also make weaker claims about stack buffer overflows in another test

Kostya Serebryany kcc at google.com
Wed Dec 4 02:48:16 PST 2013


Author: kcc
Date: Wed Dec  4 04:48:16 2013
New Revision: 196375

URL: http://llvm.org/viewvc/llvm-project?rev=196375&view=rev
Log:
[asan] require __i686__ for the SSE test; also make weaker claims about stack buffer overflows in another test

Modified:
    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/tests/asan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?rev=196375&r1=196374&r2=196375&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:48:16 2013
@@ -452,12 +452,14 @@ NOINLINE void SizedStackTest() {
   for (size_t i = 0; i < kSize; i++)
     A[i] = i;
   EXPECT_DEATH(A[-1] = 0, "");
-  EXPECT_DEATH(A[-20] = 0, "");
-  EXPECT_DEATH(A[-31] = 0, "");
+  EXPECT_DEATH(A[-5] = 0, "");
+  if (kSize > 16)
+    EXPECT_DEATH(A[-31] = 0, "");
   EXPECT_DEATH(A[kSize] = 0, "");
   EXPECT_DEATH(A[kSize + 1] = 0, "");
-  EXPECT_DEATH(A[kSize + 10] = 0, "");
-  EXPECT_DEATH(A[kSize + 31] = 0, "");
+  EXPECT_DEATH(A[kSize + 5] = 0, "");
+  if (kSize > 16)
+    EXPECT_DEATH(A[kSize + 31] = 0, "");
 }
 
 TEST(AddressSanitizer, SimpleStackTest) {
@@ -669,7 +671,8 @@ TEST(AddressSanitizer, ThreadStackReuseT
   PTHREAD_JOIN(t, 0);
 }
 
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i686__) || defined(__x86_64__)
+#include <emmintrin.h>
 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=196375&r1=196374&r2=196375&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:48:16 2013
@@ -41,10 +41,6 @@
 #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