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.