public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/3141: DR 243: basic_istream::get and getline when sentry reports failure
@ 2001-11-15 13:52 rodrigc
  0 siblings, 0 replies; 5+ messages in thread
From: rodrigc @ 2001-11-15 13:52 UTC (permalink / raw)
  To: bkoz; +Cc: gcc-prs

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

From: rodrigc@gcc.gnu.org
To: bkoz@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org,
  gcc-prs@gcc.gnu.org, kenny.simpson@gs.com, theonetruekenny@yahoo.com
Cc:  
Subject: Re: libstdc++/3141: DR 243: basic_istream::get and getline when sentry reports failure
Date: 21 Nov 2001 01:57:34 -0000

 Synopsis: DR 243: basic_istream::get and getline when sentry reports failure
 
 State-Changed-From-To: feedback->closed
 State-Changed-By: rodrigc
 State-Changed-When: Tue Nov 20 17:57:34 2001
 State-Changed-Why:
     bkoz fixed this and provided a description why
     additional changes suggested by submitter should not be
     made.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=3141&database=gcc


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

* Re: libstdc++/3141: DR 243: basic_istream::get and getline when sentry reports failure
@ 2001-11-16  9:16 Benjamin Kosnik
  0 siblings, 0 replies; 5+ messages in thread
From: Benjamin Kosnik @ 2001-11-16  9:16 UTC (permalink / raw)
  To: bkoz; +Cc: gcc-prs

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

From: Benjamin Kosnik <bkoz@redhat.com>
To: rodrigc@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org
Subject: Re: libstdc++/3141: DR 243: basic_istream::get and getline when sentry reports failure
Date: Tue, 20 Nov 2001 19:34:29 -0800 (PST)

 Actually.... this should probably be kept open. There was some commentary 
 that I would like to respond to, when time permits.


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

* Re: libstdc++/3141: DR 243: basic_istream::get and getline when sentry reports failure
@ 2001-11-15 13:33 rodrigc
  0 siblings, 0 replies; 5+ messages in thread
From: rodrigc @ 2001-11-15 13:33 UTC (permalink / raw)
  To: bkoz, gcc-bugs, gcc-gnats, gcc-prs, kenny.simpson, theonetruekenny

Synopsis: DR 243: basic_istream::get and getline when sentry reports failure

State-Changed-From-To: feedback->closed
State-Changed-By: rodrigc
State-Changed-When: Tue Nov 20 17:57:34 2001
State-Changed-Why:
    bkoz fixed this and provided a description why
    additional changes suggested by submitter should not be
    made.

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


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

* Re: libstdc++/3141: DR 243: basic_istream::get and getline when sentry reports failure
@ 2001-06-12 14:36 bkoz
  0 siblings, 0 replies; 5+ messages in thread
From: bkoz @ 2001-06-12 14:36 UTC (permalink / raw)
  To: bkoz, gcc-bugs, gcc-prs, kenny.simpson, nobody, theonetruekenny

Synopsis: DR 243: basic_istream::get and getline when sentry reports failure

Responsible-Changed-From-To: unassigned->bkoz
Responsible-Changed-By: bkoz
Responsible-Changed-When: Tue Jun 12 14:36:31 2001
Responsible-Changed-Why:
    Mine.
State-Changed-From-To: open->feedback
State-Changed-By: bkoz
State-Changed-When: Tue Jun 12 14:36:31 2001
State-Changed-Why:
    I've made the char_type() changes.
    
    For the rest, I think your analysis is wrong. The point is that the terminating NULL *is* added unconditionally, and this is clarifying language to support this. Thus, the moving of the adding char_type() to terminate the string inside the if(sentry) loop would cause a defect, not fix one.
    
    There's a reason for the not checking n > 0 for the second bit, I can't remember it offhand but it has to do with changing required error flags. It's checked for in the testsuite, so changing this one small bit will probably show the failure. Anyway.
    
    -benjamin

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3141&database=gcc


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

* libstdc++/3141: DR 243: basic_istream::get and getline when sentry reports failure
@ 2001-06-12 10:26 theonetruekenny
  0 siblings, 0 replies; 5+ messages in thread
From: theonetruekenny @ 2001-06-12 10:26 UTC (permalink / raw)
  To: gcc-gnats; +Cc: kenny.simpson

>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:


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

end of thread, other threads:[~2001-11-21  3:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-15 13:52 libstdc++/3141: DR 243: basic_istream::get and getline when sentry reports failure rodrigc
  -- strict thread matches above, loose matches on Subject: below --
2001-11-16  9:16 Benjamin Kosnik
2001-11-15 13:33 rodrigc
2001-06-12 14:36 bkoz
2001-06-12 10:26 theonetruekenny

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).