[libcxx-commits] [libcxx] 12dd9cd - [libc++] [LIBCXX-DEBUG-FIXME] Iterating a string::iterator "off the end" is UB.

Arthur O'Dwyer via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 5 13:23:44 PDT 2021


Author: Arthur O'Dwyer
Date: 2021-05-05T16:21:09-04:00
New Revision: 12dd9cdf1a8267e0c5db4f191f2598648de02619

URL: https://github.com/llvm/llvm-project/commit/12dd9cdf1a8267e0c5db4f191f2598648de02619
DIFF: https://github.com/llvm/llvm-project/commit/12dd9cdf1a8267e0c5db4f191f2598648de02619.diff

LOG: [libc++] [LIBCXX-DEBUG-FIXME] Iterating a string::iterator "off the end" is UB.

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp
index c0d683d09bd54..3c253ac157c15 100644
--- a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp
@@ -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);
   }
   {


        


More information about the libcxx-commits mailing list