[libc++] [LIBCXX-DEBUG-FIXME] Iterating a string::iterator "off the end" is UB.
authorArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Wed, 21 Apr 2021 01:51:41 +0000 (21:51 -0400)
committerArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Wed, 5 May 2021 20:21:09 +0000 (16:21 -0400)
The range of char pointers [data, data+size] is a valid closed range,
but the range [begin, end) is valid only half-open.

Differential Revision: https://reviews.llvm.org/D101676

libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp

index c0d683d..3c253ac 100644 (file)
@@ -6,8 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: LIBCXX-DEBUG-FIXME
-
 // UNSUPPORTED: c++03
 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
@@ -44,7 +42,7 @@ int main(int, char**)
     assert(p == In1);
   }
   {
-    path p = fs::u8path(In3);
+    path p = fs::u8path(In2.data());
     assert(p == In1);
   }
   {
@@ -67,7 +65,7 @@ int main(int, char**)
     assert(p == In1);
   }
   {
-    path p = fs::u8path(u8In3);
+    path p = fs::u8path(u8In2.data());
     assert(p == In1);
   }
   {