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

mohsinrzaidi at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Mar 24 10:47:00 GMT 2011


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

--- Comment #10 from Mohsin <mohsinrzaidi at gmail dot com> 2011-03-24 10:21:56 UTC ---
Two questions here:

1. Is the behaviour undefined for __n < number of elements in __s?

2. For cases undefined in the specs, do we take steps to ensure robustness? I
still cannot digest that a programmer error could corrupt std::string static
memory.



More information about the Gcc-bugs mailing list