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.

Reply via email to