XFAIL aligned allocation test failures with UBSAN
authorEric Fiselier <eric@efcs.ca>
Fri, 14 Oct 2016 07:49:15 +0000 (07:49 +0000)
committerEric Fiselier <eric@efcs.ca>
Fri, 14 Oct 2016 07:49:15 +0000 (07:49 +0000)
llvm-svn: 284210

libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp

index 6d7ef7a..b8a5f7c 100644 (file)
@@ -17,6 +17,9 @@
 // None of the current GCC compilers support this.
 // XFAIL: gcc-4, gcc-5, gcc-6
 
+// UBSAN replaces certain new/delete functions which makes this test fail
+// XFAIL: ubsan
+
 #include <new>
 #include <cstddef>
 #include <cstdlib>
@@ -58,24 +61,24 @@ struct alignas(std::max_align_t) B {};
 int main()
 {
     {
-        B *x = new B;
+        B *x = new B[2];
         assert(0 == unsized_delete_called);
         assert(0 == unsized_delete_nothrow_called);
         assert(0 == aligned_delete_called);
 
-        delete x;
+        delete [] x;
         assert(1 == unsized_delete_called);
         assert(0 == unsized_delete_nothrow_called);
         assert(0 == aligned_delete_called);
     }
     reset();
     {
-        A *x = new A;
+        A *x = new A[2];
         assert(0 == unsized_delete_called);
         assert(0 == unsized_delete_nothrow_called);
         assert(0 == aligned_delete_called);
 
-        delete x;
+        delete [] x;
         assert(0 == unsized_delete_called);
         assert(0 == unsized_delete_nothrow_called);
         assert(1 == aligned_delete_called);
index 11d2901..02522d0 100644 (file)
@@ -17,6 +17,9 @@
 // None of the current GCC compilers support this.
 // XFAIL: gcc-4, gcc-5, gcc-6
 
+// UBSAN replaces certain new/delete functions which makes this test fail
+// XFAIL: ubsan
+
 #include <new>
 #include <cstddef>
 #include <cstdlib>