[Bug libstdc++/56166] std::string::clear() can throw despite being marked noexcept

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Sep 23 17:28:00 GMT 2016


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |7.0

--- Comment #15 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #12)
> I think __gnu_cxx::__rc_string has the same problem
> 
> There's a patch at https://gcc.gnu.org/ml/gcc-patches/2014-06/msg00278.html

I've committed that patch, so this is fixed for the COW strings too (except for
the fully-dynamic string case, where it can still throw, but at least won't
terminate now).


More information about the Gcc-bugs mailing list