This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libstdc++/7111: cout of null pointer causes core dump


>Number:         7111
>Category:       libstdc++
>Synopsis:       cout of null pointer causes core dump
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 24 15:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     rdhunt@sandia.gov
>Release:        gcc version 3.1
>Organization:
>Environment:
Sun SunOS 5.8
>Description:
Trying to print a null character pointer causes this program to core dump.  This works fine under GCC 2.95.  I know null pointers are sensitive and am not completely sure if this is truly a bug or what the correct way of handling this is.
>How-To-Repeat:
Compile it and run it.  If I change the char* to be void* it works fine.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="checknull.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="checknull.cpp"

CiNpbmNsdWRlIDxpb3N0cmVhbS5oPgoKaW50IG1haW4oKQp7CiAgIGNoYXIgKm15bnVsbD1OVUxM
OwogICBjb3V0IDw8ICJteW51bGwgcmVzdWx0OiAiIDw8IG15bnVsbCA8PCBlbmRsOwp9Cg==


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]