[Bug libstdc++/79254] basic_string::operator= isn't exception safe

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 27 01:21:00 GMT 2017


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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
That patch is wrong, it also needs this in the catch block to restore the
original allocator:

  _M_get_allocator() = __guard._M_alloc;


More information about the Gcc-bugs mailing list