[Bug libstdc++/48257] std::string::assign() corrupts std::string static data when called on emptyString1 using emptyString2.data()

paolo.carlini at oracle dot com gcc-bugzilla@gcc.gnu.org
Thu Mar 24 08:59:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48257

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-03-24 08:02:51 UTC ---
Jon is absolutely right. Please, always refer to the Standard for the complete
specifications. And yes exceeding max_size for the total length leads to an
exception being thrown, this is what _M_check_length is for.



More information about the Gcc-bugs mailing list