public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Phil Edwards <phil@jaj.com>
To: bkoz@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: libstdc++/7111: cout of null pointer causes core dump
Date: Wed, 03 Jul 2002 10:46:00 -0000	[thread overview]
Message-ID: <20020703174603.27623.qmail@sources.redhat.com> (raw)

The following reply was made to PR libstdc++/7111; it has been noted by GNATS.

From: Phil Edwards <phil@jaj.com>
To: rdhunt@sandia.gov
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: libstdc++/7111: cout of null pointer causes core dump
Date: Wed, 3 Jul 2002 13:45:41 -0400

 On Mon, Jun 24, 2002 at 10:20:23PM -0000, rdhunt@sandia.gov wrote:
 > >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.
 
 It's undefined behavior, so coredumping is strictly allowed (while annoying,
 and obviously not friendly).  As bkoz mentioned, the sources have been changed
 to notice and throw an exception.
 
 GCC 2.x used a completely different library as 3.x.
 
 
 > >How-To-Repeat:
 > Compile it and run it.  If I change the char* to be void* it works fine.
 
 For void* I think you'd be getting a pointer address.
 
 Phil
 
 -- 
 If ye love wealth greater than liberty, the tranquility of servitude greater
 than the animating contest for freedom, go home and leave us in peace.  We seek
 not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
 and may posterity forget that ye were our countrymen.            - Samuel Adams


             reply	other threads:[~2002-07-03 17:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-03 10:46 Phil Edwards [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-07-04 10:01 bkoz
2002-07-03 10:02 bkoz
2002-06-24 15:35 rdhunt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020703174603.27623.qmail@sources.redhat.com \
    --to=phil@jaj.com \
    --cc=bkoz@gcc.gnu.org \
    --cc=gcc-prs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).