[Bug libstdc++/105957] __n * sizeof(_Tp) might overflow under consteval context for std::allocator

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jun 14 20:19:22 GMT 2022


--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:


commit r13-1093-g0a9af7b4ef1b8aa85cc8820acf54d41d1569fc10
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Jun 14 14:37:25 2022 +0100

    libstdc++: Check for size overflow in constexpr allocation [PR105957]


            PR libstdc++/105957
            * include/bits/allocator.h (allocator::allocate): Check for
            overflow in constexpr allocation.
            * testsuite/20_util/allocator/105975.cc: New test.

More information about the Gcc-bugs mailing list