[Bug libstdc++/97781] New: basic_stringbuf::swap is not exception safe
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 10 12:10:06 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97781
Bug ID: 97781
Summary: basic_stringbuf::swap is not exception safe
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
If swapping the strings throws, the rest of the state has already been swapped,
and the __xfer_bufptrs guards will make further changes.
Swapping the strings should be done first, and __xfer_bufptrs can't be used.
More information about the Gcc-bugs
mailing list