https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94906

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jonathan Wakely
<r...@gcc.gnu.org>:

https://gcc.gnu.org/g:45a6686e76bfcd48f7c72a23d0e15186f76b4bfc

commit r9-8588-g45a6686e76bfcd48f7c72a23d0e15186f76b4bfc
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Tue May 12 09:54:44 2020 +0100

    libstdc++: Fix incorrect size calculation in PMR resource  (PR 94906)

    Calculating the size of a chunk being returned to the upstream allocator
    was done with a 32-bit type, so it wrapped if the chunk was 4GB or
    larger.

    I don't know how to test this without allocating 4GB, so there's no test
    in the testsuite. It has been tested manually of course.

    Backport from mainline
    2020-05-04  Jonathan Wakely  <jwak...@redhat.com>

            PR libstdc++/94906
            * src/c++17/memory_resource.cc
            (monotonic_buffer_resource::_Chunk::release): Use size_t for shift
            operands.

Reply via email to