http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48355
--- Comment #3 from Amr Ali <amr.ali.cc at gmail dot com> 2011-03-30 09:13:57 UTC --- (In reply to comment #2) > duplicate of PR 5258 and PR 994 > > I'll look into checking when _GLIBCXX_DEBUG is defined but the default > (non-debug mode) behaviour is NOT going to change, your code has a bug, your > code should change not the standard library Yes, I'm not saying that what I'm doing is "right", I'm rather pointed out that the code actually segfaults, which shouldn't happen even with a faulty value like a NULL pointer. I'm only suggesting that a check for a null pointer be present as in the string() ctor case.