[compiler-rt] r238837 - [ASan] Fixed tests to pass on Darwin. Patch by Maria Guseva!

Yury Gribov y.gribov at samsung.com
Tue Jun 2 07:59:26 PDT 2015


Author: ygribov
Date: Tue Jun  2 09:59:26 2015
New Revision: 238837

URL: http://llvm.org/viewvc/llvm-project?rev=238837&view=rev
Log:
[ASan] Fixed tests to pass on Darwin. Patch by Maria Guseva!

Differential Revision: http://reviews.llvm.org/D10159

Modified:
    compiler-rt/trunk/test/asan/TestCases/strcasestr-1.c
    compiler-rt/trunk/test/asan/TestCases/strcasestr-2.c
    compiler-rt/trunk/test/asan/TestCases/strstr-1.c
    compiler-rt/trunk/test/asan/TestCases/strstr-2.c

Modified: compiler-rt/trunk/test/asan/TestCases/strcasestr-1.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strcasestr-1.c?rev=238837&r1=238836&r2=238837&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strcasestr-1.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/strcasestr-1.c Tue Jun  2 09:59:26 2015
@@ -2,7 +2,8 @@
 // RUN: %clang_asan %s -o %t && ASAN_OPTIONS=strict_string_checks=true not %run %t 2>&1 | FileCheck %s
 
 // Test intercept_strstr asan option
-// RUN: ASAN_OPTIONS=intercept_strstr=false %run %t 2>&1
+// Disable other interceptors because strlen may be called inside strcasestr
+// RUN: ASAN_OPTIONS=intercept_strstr=false:replace_str=false %run %t 2>&1
 
 // There's no interceptor for strcasestr on Windows
 // XFAIL: win32

Modified: compiler-rt/trunk/test/asan/TestCases/strcasestr-2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strcasestr-2.c?rev=238837&r1=238836&r2=238837&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strcasestr-2.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/strcasestr-2.c Tue Jun  2 09:59:26 2015
@@ -2,7 +2,8 @@
 // RUN: %clang_asan %s -o %t && ASAN_OPTIONS=strict_string_checks=true not %run %t 2>&1 | FileCheck %s
 
 // Test intercept_strstr asan option
-// RUN: ASAN_OPTIONS=intercept_strstr=false %run %t 2>&1
+// Disable other interceptors because strlen may be called inside strcasestr
+// RUN: ASAN_OPTIONS=intercept_strstr=false:replace_str=false %run %t 2>&1
 
 // There's no interceptor for strcasestr on Windows
 // XFAIL: win32

Modified: compiler-rt/trunk/test/asan/TestCases/strstr-1.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strstr-1.c?rev=238837&r1=238836&r2=238837&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strstr-1.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/strstr-1.c Tue Jun  2 09:59:26 2015
@@ -2,7 +2,8 @@
 // RUN: %clang_asan %s -o %t && ASAN_OPTIONS=strict_string_checks=true not %run %t 2>&1 | FileCheck %s
 
 // Test intercept_strstr asan option
-// RUN: ASAN_OPTIONS=intercept_strstr=false %run %t 2>&1
+// Disable other interceptors because strlen may be called inside strstr
+// RUN: ASAN_OPTIONS=intercept_strstr=false:replace_str=false %run %t 2>&1
 
 #include <assert.h>
 #include <string.h>

Modified: compiler-rt/trunk/test/asan/TestCases/strstr-2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strstr-2.c?rev=238837&r1=238836&r2=238837&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strstr-2.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/strstr-2.c Tue Jun  2 09:59:26 2015
@@ -2,7 +2,8 @@
 // RUN: %clang_asan %s -o %t && ASAN_OPTIONS=strict_string_checks=true not %run %t 2>&1 | FileCheck %s
 
 // Test intercept_strstr asan option
-// RUN: ASAN_OPTIONS=intercept_strstr=false %run %t 2>&1
+// Disable other interceptors because strlen may be called inside strstr
+// RUN: ASAN_OPTIONS=intercept_strstr=false:replace_str=false %run %t 2>&1
 
 #include <assert.h>
 #include <string.h>





More information about the llvm-commits mailing list