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: "mohsinrzaidi at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Mar 2011 19:09:37 -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
Mohsin <mohsinrzaidi at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
--- Comment #2 from Mohsin <mohsinrzaidi at gmail dot com> 2011-03-23 19:09:31 UTC ---
(In reply to comment #1)
> this is undefined behaviour, the standard requires that emptyStr2.data() points
> to an array of at least 4 chars
Kindly point me to where this is stated in the standards. I have searched but
have not been able to find any information in this regard.