llvm-project/libcxx/lib/abi
Mikhail Maltsev be10b1f1cc [libcxx] Make allocator<T>:allocate throw bad_array_new_length
Currently the member functions std::allocator<T>::allocate,
std::experimental::pmr::polymorphic_allocator::allocate and
std::resource_adaptor<T>::do_allocate throw an exception of type
std::length_error when the requested size exceeds the maximum size.

According to the C++ standard ([allocator.members]/4,
[mem.poly.allocator.mem]/1), std::allocator<T>::allocate and
std::pmr::polymorphic_allocator::allocate must throw a
std::bad_array_new_length exception in this case.

The patch fixes the issue with std::allocator<T>::allocate and changes
the type the exception thrown by
std::experimental::pmr::resource_adaptor<T>::do_allocate to
std::bad_array_new_length as well for consistency.

The patch resolves LWG 3237, LWG 3038 and LWG 3190.

Reviewed By: ldionne, #libc, Quuxplusone

Differential Revision: https://reviews.llvm.org/D110846
2021-10-18 19:12:42 +01:00
..
CHANGELOG.TXT [libc++][NFC] Add missing commits to the ABI changelog 2021-07-20 09:19:52 -04:00
CMakeLists.txt [runtimes] Simplify how we set the target triple 2021-07-16 10:33:39 -04:00
README.TXT [libc++] Make it easier to re-generate the ABI lists 2020-11-02 11:36:35 -05:00
arm64-apple-darwin.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist [libc++] Generate ABI list for macOS arm64 2021-07-13 10:16:50 -04:00
x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist [libc++] Disentangle std::pointer_safety 2021-05-03 14:33:49 -04:00
x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist [libcxx] Make allocator<T>:allocate throw bad_array_new_length 2021-10-18 19:12:42 +01:00

README.TXT

This directory contains abi lists representing the symbols exported
by the libc++ library. The lists are generated using libcxx/utils/generate_abi_list.py.

Every time a symbol is added or removed from the libc++ library, each of the
lists *MUST* be updated to reflect the changes. This can be done by using the
`generate-cxx-abilist` CMake target.

We do not keep an up-to-date ABI list for all the build configurations of libc++.
Currently, only the default configuration on MacOS and Linux are supported.