This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-03-24 09:37:03 UTC ---
(In reply to comment #4)
> 
> I don't see any errors being thrown. I am not trying to nit-pick but I've
> raised this issue because I was affected by it and had to spend several days
> isolating it. It would have made my life a whole lot easier if, as you claim,
> libstdc++ had thrown an error.

I never claimed there'd be an exception throw in your original example, I said
it's undefined behaviour.  An exception is thrown if n > max_size()

> Just a request, but please let the discussion complete before you go ahead and
> mark the bug as Resolved-Invalid. I don't mind it being marked invalid, but I
> consider it disrespectful for you to not even wait for my response and rushing
> to mark it as invalid. Once we're through discussing, I will mark it invalid
> myself if necessary.

That's not how it works, most users do not close their own bugs, maintainers
don't want to keep revisiting old bugs to see if the user has decided to accept
the resolution yet.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]