https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21334
--- Comment #58 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:31d7e0751e58ce006038fa5100a79da6ec6ddb7e commit r12-11038-g31d7e0751e58ce006038fa5100a79da6ec6ddb7e 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)