Skip to content

[libc++] undefined behaviour in std::set/std::map/std::unordered_set/std::unordered_map #102547

@hanickadot

Description

@hanickadot

I was implementing P3372 (constexpr containers and adaptors) in libc++ and found UB which fails evaluation in ExprConstant.cpp.

It's in these two files:
libcxx/include/__tree
libcxx/include/__hash_table

(link is to the locations of problems)

These are similar issue where a node / bucket is allocated, but NOT constructed, and then a subobject is constructed.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions