http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58415
--- Comment #2 from Michael Kirzinger <mkirzinger at gmail dot com> --- There appears to be one additional problem: if __rcs._M_is_local() is true, but __rcs._M_length() is false, the buffer of the string being created is never null terminated/zeroed. Example: ---------------------------------------------------------- #include <ext/vstring.h> #include <cstdio> #include <cstdlib> #include <cstring> typedef __gnu_cxx::__versa_string<char> string; int main() { char buf[sizeof(string)+1] = "stringstringstring"; string s1; string* s2 = new (buf) string(std::move(s1)); printf("%s\n", s2->c_str()); }