Skip to content

Precondition violations in libc++ tests for std::pmr::polymorphic_allocator #148420

@jwakely

Description

@jwakely

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);

  1. 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?

Metadata

Metadata

Assignees

Labels

libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions