http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52938
--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-04-11 23:57:34 UTC --- What we tried to explain is that this sort of issue is well known and, more or less, affects *any* reference counted implementation (I'm pretty sure you can even find duplicates in Bugzilla or discussions in the mailing lists). That is not the case when reference counting is not used and indeed it will *not* be used (per the new C++11 Standard) in a new implementation of std::string which we are currently showcasing as <ext/vstring.h>. Therefore, until a new "C++11" ABI will become alive, and with it a new std::string, you can only work around the issues, or experiment with <ext/vstring.h>, sorry.