Issue 148420
Summary Precondition violations in libc++ tests for std::pmr::polymorphic_allocator
Labels libc++
Assignees
Reporter jwakely
    https://github.com/llvm/llvm-project/blob/d86c63d8e3ec135aadfb2dd2651f95ba2d74a6ab/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/select_on_container_copy_construction.pass.cpp#L42


https://github.com/llvm/llvm-project/blob/d86c63d8e3ec135aadfb2dd2651f95ba2d74a6ab/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/resource.pass.cpp#L37


I've found a few places where a null `memory_resource*` is passed to a resource or a `polymorphic_allocator`, which is undefined:

[mem.poly.allocator.ctor]:

> `polymorphic_allocator(memory_resource* r);`  
>  
> 2.  _Preconditions_: `r` is non-null.

If this is an intentional libc++ extension then should the tests be guarded with `_LIBCPP_VERSION`, or moved to the libcxx/test/libcxx directory for non-standard features?

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to