This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/48257] std::string::assign() corrupts std::string static data when called on emptyString1 using emptyString2.data()
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Mar 2011 08:02:55 -0000
- Subject: [Bug libstdc++/48257] std::string::assign() corrupts std::string static data when called on emptyString1 using emptyString2.data()
- Auto-submitted: auto-generated
- References: <bug-48257-4@http.gcc.gnu.org/bugzilla/>
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.