[PATCH] Fix strstr, strcasestr tests failures

Yury Gribov tetra2005 at gmail.com
Tue Jun 2 08:03:39 PDT 2015


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D10159

Files:
  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

Index: compiler-rt/trunk/test/asan/TestCases/strstr-2.c
===================================================================
--- compiler-rt/trunk/test/asan/TestCases/strstr-2.c
+++ compiler-rt/trunk/test/asan/TestCases/strstr-2.c
@@ -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>
Index: compiler-rt/trunk/test/asan/TestCases/strcasestr-1.c
===================================================================
--- compiler-rt/trunk/test/asan/TestCases/strcasestr-1.c
+++ compiler-rt/trunk/test/asan/TestCases/strcasestr-1.c
@@ -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
Index: compiler-rt/trunk/test/asan/TestCases/strstr-1.c
===================================================================
--- compiler-rt/trunk/test/asan/TestCases/strstr-1.c
+++ compiler-rt/trunk/test/asan/TestCases/strstr-1.c
@@ -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>
Index: compiler-rt/trunk/test/asan/TestCases/strcasestr-2.c
===================================================================
--- compiler-rt/trunk/test/asan/TestCases/strcasestr-2.c
+++ compiler-rt/trunk/test/asan/TestCases/strcasestr-2.c
@@ -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

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10159.26971.patch
Type: text/x-patch
Size: 2656 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150602/77f7e166/attachment.bin>


More information about the llvm-commits mailing list