public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: theonetruekenny@yahoo.com
To: gcc-gnats@gcc.gnu.org
Cc: kenny.simpson@gs.com
Subject: libstdc++/3141: DR 243: basic_istream::get and getline when sentry reports failure
Date: Tue, 12 Jun 2001 10:26:00 -0000	[thread overview]
Message-ID: <20010612171941.25791.qmail@sourceware.cygnus.com> (raw)

>Number:         3141
>Category:       libstdc++
>Synopsis:       DR 243: basic_istream::get and getline when sentry reports failure
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 12 10:26:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     theonetruekenny@yahoo.com
>Release:        20010612 cvs
>Organization:
>Environment:
source
>Description:
see
http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html#243
>How-To-Repeat:
observe istream::get(char_type* __s, streamsize __n, char_type __delim)
in line 536 of include/bits/istream.tcc

note that on line 573: *__s = char_type(NULL);

observe istream::getline(char_type* __s, streamsize __n, char_type __delim)
in line 627 of include/bits/istream.tcc
note on line 673: *__s = char_type(NULL);
>Fix:
as per DR 243,
i.e.:
before the sentry construction in both the functions, add:
if( __n ) *s == char_type(); // same as charT() as specified in the DR 243

change the existing *__s = char_type(NULL)'s in 573/673 to
*s == char_type(); and move then inside the body of the if's on lines
540 and 631.

The condition in the if() on line 631 should be changed to match that
of the if() on line 540.
>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2001-06-12 10:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-12 10:26 theonetruekenny [this message]
2001-06-12 14:36 bkoz
2001-11-15 13:33 rodrigc
2001-11-15 13:52 rodrigc
2001-11-16  9:16 Benjamin Kosnik

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=20010612171941.25791.qmail@sourceware.cygnus.com \
    --to=theonetruekenny@yahoo.com \
    --cc=gcc-gnats@gcc.gnu.org \
    --cc=kenny.simpson@gs.com \
    /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).