[Bug libstdc++/79254] [5/6/7 Regression] basic_string::operator= isn't exception safe
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 27 01:58:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79254
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #3)
> That patch is wrong, it also needs this in the catch block to restore the
> original allocator:
>
> _M_get_allocator() = __guard._M_alloc;
And we only need to restore anything if (__guard._M_ptr != nullptr)
I'll test the complete patch tomorrow.
More information about the Gcc-bugs
mailing list