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 #9 from Mohsin <mohsinrzaidi at gmail dot com> 2011-03-24 09:52:56 UTC ---
(In reply to comment #7)
> (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()
> 

Agreed.

> > 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.

Agreed.(In reply to comment #7)
> (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.

Agreed, thanks.


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