public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/5259: Assigning a null char * to a std::string causes seg fault
@ 2002-01-02 22:47 rodrigc
  0 siblings, 0 replies; 2+ messages in thread
From: rodrigc @ 2002-01-02 22:47 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, mdhender, nobody

Synopsis: Assigning a null char * to a std::string causes seg fault

State-Changed-From-To: open->closed
State-Changed-By: rodrigc
State-Changed-When: Wed Jan  2 22:47:36 2002
State-Changed-Why:
    Duplicate of PR 5258.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5259


^ permalink raw reply	[flat|nested] 2+ messages in thread

* libstdc++/5259: Assigning a null char * to a std::string causes seg fault
@ 2002-01-02 12:46 Michael Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Henderson @ 2002-01-02 12:46 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5259
>Category:       libstdc++
>Synopsis:       Assigning a null char * to a std::string causes seg fault
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 02 12:46:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Michael Henderson
>Release:        3.0.3
>Organization:
Lockheed Martin
>Environment:
System: SunOS tin 5.6 Generic_105181-23 sun4u sparc SUNW,Ultra-4
Architecture: sun4

	
host: sparc-sun-solaris2.6
build: sparc-sun-solaris2.6
target: sparc-sun-solaris2.6
configured with: /ftp/lmphr/local/src/gnu/gcc/gcc-3.0.3/configure -prefix=/ftp/lmpbn/local -enable-languages=c++ -enable-shared
>Description:
	Compile program, run as ./nullstr to fail, ./nullstr to pass
#include <string>

int
main(int argc, char*argv[])
{
   char *pStr = argc > 1 ? argv[0] : (char*)0;

   std::string str = pStr;

   return 0;
}

>How-To-Repeat:

>Fix:
	std::string str = pStr ? pStr : "";
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-01-03  6:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-02 22:47 libstdc++/5259: Assigning a null char * to a std::string causes seg fault rodrigc
  -- strict thread matches above, loose matches on Subject: below --
2002-01-02 12:46 Michael Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).