This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/5258: Assigning a null char * to a std::string causes seg fault
- From: pme at gcc dot gnu dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, michael dot d dot henderson at lmco dot com, nobody at gcc dot gnu dot org
- Date: 2 Jan 2002 20:47:37 -0000
- Subject: Re: libstdc++/5258: Assigning a null char * to a std::string causes seg fault
- Reply-to: pme at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, michael dot d dot henderson at lmco dot com, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: Assigning a null char * to a std::string causes seg fault
State-Changed-From-To: open->closed
State-Changed-By: pme
State-Changed-When: Wed Jan 2 12:47:37 2002
State-Changed-Why:
Thank you for your bug report.
The C++ standard requires that the user not pass a null
pointer as the initial string, so this is user error,
not a library bug.
One of my hopes to have some kind of "debugging mode"
for libstdc++, which would sacrifice speed in return for
doing a lot of this kind of extra checking. Something for
3.2, maybe.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5258