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

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

https://gcc.gnu.org/g:4ec931c5e514ce0731cc72085af817ce0c6f3887

commit r14-11615-g4ec931c5e514ce0731cc72085af817ce0c6f3887
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Fri Apr 11 11:08:34 2025 +0100

    libstdc++: Document thread-safety for COW std::string [PR21334]

    The gcc4-compatible copy-on-write std::string does not conform to the
    C++11 requirements on data race avoidance in standard containers.
    Specifically, calling non-const member functions such as begin() and
    data() needs to do the "copy on write" operation and so is most
    definitely a modification of the object. As such, those non-const
    members must not be called concurrently with any other uses of the
    string object.

    libstdc++-v3/ChangeLog:

            PR libstdc++/21334
            * doc/xml/manual/using.xml: Document that container data race
            avoidance rules do not apply to COW std::string.
            * doc/html/*: Regenerate.

    (cherry picked from commit dd35f66287b7cca196a720c9641e463255dceb1c)

Reply via email to