[compiler-rt] r262276 - [asan] Fix new[]/delete mismatch in tests.

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 29 16:38:39 PST 2016


Author: eugenis
Date: Mon Feb 29 18:38:39 2016
New Revision: 262276

URL: http://llvm.org/viewvc/llvm-project?rev=262276&view=rev
Log:
[asan] Fix new[]/delete mismatch in tests.

This code is actually never executed because all RUN lines trigger an
earlier heap-use-after-free, but there is still a compiler warning.

Modified:
    compiler-rt/trunk/test/asan/TestCases/large_func_test.cc

Modified: compiler-rt/trunk/test/asan/TestCases/large_func_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/large_func_test.cc?rev=262276&r1=262275&r2=262276&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/large_func_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/large_func_test.cc Mon Feb 29 18:38:39 2016
@@ -49,5 +49,5 @@ int main(int argc, char **argv) {
   // CHECK-Linux: {{    #0 0x.* in operator new.*}}
   // CHECK-Darwin: {{    #0 0x.* in .*_Zna.*}}
   // CHECK: {{    #1 0x.* in main .*large_func_test.cc:}}[[@LINE-7]]
-  delete x;
+  delete[] x;
 }




More information about the llvm-commits mailing list