[compiler-rt] r215641 - [ASan/Win] Slightly update&relax test expectations to work with both -MT and -MD (in progress, PR20214) CRTs

Timur Iskhodzhanov timurrrr at google.com
Thu Aug 14 06:11:39 PDT 2014


Author: timurrrr
Date: Thu Aug 14 08:11:39 2014
New Revision: 215641

URL: http://llvm.org/viewvc/llvm-project?rev=215641&view=rev
Log:
[ASan/Win] Slightly update&relax test expectations to work with both -MT and -MD (in progress, PR20214) CRTs

Modified:
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc?rev=215641&r1=215640&r2=215641&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc Thu Aug 14 08:11:39 2014
@@ -13,10 +13,10 @@ int test_function() {
 //
 // CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region
 // CHECK-LABEL: allocated by thread T0 here:
-// FIXME: should get rid of the malloc/free frames called from the inside of
-// operator new/delete in DLLs.  Also, the operator new frame should have [].
-// CHECK-NEXT:   malloc
-// CHECK-NEXT:   operator new
+// FIXME: Should get rid of the malloc/free frames called from the inside of
+// operator new/delete in DLLs when using -MT CRT.
+// FIXME: The 'operator new' frame should have [].
+// CHECK:        operator new
 // CHECK-NEXT:   test_function {{.*}}dll_operator_array_new_left_oob.cc:[[@LINE-13]]
 // CHECK-NEXT:   main {{.*}}dll_host.cc
 // CHECK-LABEL: SUMMARY

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc?rev=215641&r1=215640&r2=215641&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc Thu Aug 14 08:11:39 2014
@@ -20,11 +20,11 @@ int test_function() {
 //        should be "8 bytes ... left of 168-byte region", see
 //        https://code.google.com/p/address-sanitizer/issues/detail?id=314
 // CHECK: [[ADDR]] is located {{.*}} bytes to the left of 172-byte region
-// FIXME: should get rid of the malloc/free frames called from the inside of
-// operator new/delete in DLLs.  Also, the operator new frame should have [].
+// FIXME: Should get rid of the malloc/free frames called from the inside of
+// operator new/delete in DLLs when using -MT CRT.
+// FIXME: The operator new frame should have [].
 // CHECK-LABEL: allocated by thread T0 here:
-// CHECK-NEXT:   malloc
-// CHECK-NEXT:   operator new
+// CHECK:        operator new
 // CHECK-NEXT:   test_function {{.*}}dll_operator_array_new_with_dtor_left_oob.cc:[[@LINE-16]]
 // CHECK-NEXT:   main {{.*}}dll_host.cc
 // CHECK-LABEL: SUMMARY

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cc?rev=215641&r1=215640&r2=215641&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cc Thu Aug 14 08:11:39 2014
@@ -8,15 +8,18 @@ int main() {
   delete [] x;
   delete [] x;
 // CHECK: AddressSanitizer: attempting double-free on [[ADDR:0x[0-9a-f]+]]
-// CHECK-NEXT: {{#0 .* operator delete}}[]
-// CHECK-NEXT: {{#1 .* main .*double_operator_delete.cc}}:[[@LINE-3]]
+// FIXME: The 'operator delete' frame should have [].
+// CHECK-NEXT: {{#0 .* operator delete}}
+// CHECK-NEXT: {{#1 .* main .*double_operator_delete.cc}}:[[@LINE-4]]
 // CHECK: [[ADDR]] is located 0 bytes inside of 168-byte region
 // CHECK-LABEL: freed by thread T0 here:
-// CHECK-NEXT: {{#0 .* operator delete}}[]
-// CHECK-NEXT: {{#1 .* main .*double_operator_delete.cc}}:[[@LINE-8]]
+// FIXME: The 'operator delete' frame should have [].
+// CHECK-NEXT: {{#0 .* operator delete}}
+// CHECK-NEXT: {{#1 .* main .*double_operator_delete.cc}}:[[@LINE-10]]
 // CHECK-LABEL: previously allocated by thread T0 here:
-// CHECK-NEXT: {{#0 .* operator new}}[]
-// CHECK-NEXT: {{#1 .* main .*double_operator_delete.cc}}:[[@LINE-12]]
+// FIXME: The 'operator new' frame should have [].
+// CHECK-NEXT: {{#0 .* operator new}}
+// CHECK-NEXT: {{#1 .* main .*double_operator_delete.cc}}:[[@LINE-15]]
   return 0;
 }
 

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cc?rev=215641&r1=215640&r2=215641&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cc Thu Aug 14 08:11:39 2014
@@ -21,7 +21,7 @@ int main() {
 // CHECK: [[ADDR]] is located 1 bytes to the left of 6-byte region
 // CHECK: allocated by thread T0 here:
 // CHECK:   {{#0 .* malloc }}
-// CHECK:   {{#1 .* _strdup }}
+// CHECK:   {{#1 .*strdup}}
 // CHECK:   {{#2 .* main .*}}intercept_strdup.cc:[[@LINE-16]]
   free(ptr);
 }

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cc?rev=215641&r1=215640&r2=215641&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cc Thu Aug 14 08:11:39 2014
@@ -10,7 +10,8 @@ int main() {
 //
 // CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region
 // CHECK-LABEL: allocated by thread T0 here:
-// CHECK-NEXT: {{#0 .* operator new}}[]
-// CHECK-NEXT: {{#1 .* main .*operator_array_new_left_oob.cc}}:[[@LINE-9]]
+// FIXME: The 'operator new' frame should have [].
+// CHECK-NEXT: {{#0 .* operator new}}
+// CHECK-NEXT: {{#1 .* main .*operator_array_new_left_oob.cc}}:[[@LINE-10]]
   delete [] buffer;
 }

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cc?rev=215641&r1=215640&r2=215641&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cc Thu Aug 14 08:11:39 2014
@@ -11,7 +11,8 @@ int main() {
 // CHECK:   {{#0 .* main .*operator_array_new_right_oob.cc}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 0 bytes to the right of 42-byte region
 // CHECK: allocated by thread T0 here:
-// CHECK:   {{#0 .* operator new}}[]
-// CHECK:   {{#1 .* main .*operator_array_new_right_oob.cc}}:[[@LINE-8]]
+// FIXME: The 'operator new' frame should have [].
+// CHECK:   {{#0 .* operator new}}
+// CHECK:   {{#1 .* main .*operator_array_new_right_oob.cc}}:[[@LINE-9]]
   delete [] buffer;
 }

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cc?rev=215641&r1=215640&r2=215641&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cc Thu Aug 14 08:11:39 2014
@@ -12,11 +12,13 @@ int main() {
 // CHECK:   {{#0 .* main .*operator_array_new_uaf.cc}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 0 bytes inside of 42-byte region
 // CHECK-LABEL: freed by thread T0 here:
-// CHECK:   {{#0 .* operator delete}}[]
-// CHECK:   {{#1 .* main .*operator_array_new_uaf.cc}}:[[@LINE-8]]
+// FIXME: The 'operator delete' frame should have [].
+// CHECK:   {{#0 .* operator delete}}
+// CHECK:   {{#1 .* main .*operator_array_new_uaf.cc}}:[[@LINE-9]]
 // CHECK-LABEL: previously allocated by thread T0 here:
-// CHECK:   {{#0 .* operator new}}[]
-// CHECK:   {{#1 .* main .*operator_array_new_uaf.cc}}:[[@LINE-12]]
+// FIXME: The 'operator new' frame should have [].
+// CHECK:   {{#0 .* operator new}}
+// CHECK:   {{#1 .* main .*operator_array_new_uaf.cc}}:[[@LINE-14]]
   return 0;
 }
 

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc?rev=215641&r1=215640&r2=215641&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc Thu Aug 14 08:11:39 2014
@@ -18,7 +18,8 @@ int main() {
 //        https://code.google.com/p/address-sanitizer/issues/detail?id=314
 // CHECK: [[ADDR]] is located {{.*}} bytes to the left of 172-byte region
 // CHECK-LABEL: allocated by thread T0 here:
-// CHECK-NEXT: {{#0 .* operator new}}[]
-// CHECK-NEXT: {{#1 .* main .*operator_array_new_with_dtor_left_oob.cc}}:[[@LINE-12]]
+// FIXME: The 'operator new' frame should have [].
+// CHECK-NEXT: {{#0 .* operator new}}
+// CHECK-NEXT: {{#1 .* main .*operator_array_new_with_dtor_left_oob.cc}}:[[@LINE-13]]
   delete [] buffer;
 }





More information about the llvm-commits mailing list