public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/12297] New: istream::sentry::sentry() handles eof() incorrectly.
@ 2003-09-16 9:03 peturr02 at ru dot is
2003-09-16 10:41 ` [Bug libstdc++/12297] " peturr02 at ru dot is
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: peturr02 at ru dot is @ 2003-09-16 9:03 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12297
Summary: istream::sentry::sentry() handles eof() incorrectly.
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: peturr02 at ru dot is
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
According to the resolution to DR 195:
http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html#195
basic_istream::sentry::sentry() should call setstate(failbit | eofbit) if
is.rdbuf()->sgetc() or is.rdbuf()->sbumpc() return eof(). Currently, the
sentry constructor calls is.setstate(eofbit) and later calls
is.setstate(failbit). This means that failbit will not be set in is.rdstate()
as it should if the call to setstate(eofbit) throws an exception.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/12297] istream::sentry::sentry() handles eof() incorrectly.
2003-09-16 9:03 [Bug libstdc++/12297] New: istream::sentry::sentry() handles eof() incorrectly peturr02 at ru dot is
@ 2003-09-16 10:41 ` peturr02 at ru dot is
2003-09-28 21:13 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: peturr02 at ru dot is @ 2003-09-16 10:41 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12297
------- Additional Comments From peturr02 at ru dot is 2003-09-16 08:36 -------
Created an attachment (id=4770)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4770&action=view)
Test case
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/12297] istream::sentry::sentry() handles eof() incorrectly.
2003-09-16 9:03 [Bug libstdc++/12297] New: istream::sentry::sentry() handles eof() incorrectly peturr02 at ru dot is
2003-09-16 10:41 ` [Bug libstdc++/12297] " peturr02 at ru dot is
@ 2003-09-28 21:13 ` pinskia at gcc dot gnu dot org
2003-10-22 20:07 ` bkoz at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-28 21:13 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12297
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-09-28 20:59:44
date| |
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-09-28 20:59 -------
I can confirm this on the mainline (20030925).
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/12297] istream::sentry::sentry() handles eof() incorrectly.
2003-09-16 9:03 [Bug libstdc++/12297] New: istream::sentry::sentry() handles eof() incorrectly peturr02 at ru dot is
2003-09-16 10:41 ` [Bug libstdc++/12297] " peturr02 at ru dot is
2003-09-28 21:13 ` pinskia at gcc dot gnu dot org
@ 2003-10-22 20:07 ` bkoz at gcc dot gnu dot org
2003-11-26 22:46 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2003-10-22 20:07 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12297
bkoz at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Last reconfirmed|2003-09-28 20:59:44 |2003-10-22 20:06:40
date| |
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/12297] istream::sentry::sentry() handles eof() incorrectly.
2003-09-16 9:03 [Bug libstdc++/12297] New: istream::sentry::sentry() handles eof() incorrectly peturr02 at ru dot is
` (2 preceding siblings ...)
2003-10-22 20:07 ` bkoz at gcc dot gnu dot org
@ 2003-11-26 22:46 ` cvs-commit at gcc dot gnu dot org
2003-11-26 22:49 ` cvs-commit at gcc dot gnu dot org
2003-11-26 22:57 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-11-26 22:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-11-26 22:46 -------
Subject: Bug 12297
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: bkoz@gcc.gnu.org 2003-11-26 22:45:57
Modified files:
libstdc++-v3 : ChangeLog
libstdc++-v3/include/bits: istream.tcc
Added files:
libstdc++-v3/testsuite/27_io/basic_istream/sentry/char: 12297.cc
Log message:
2003-11-26 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/12297
* include/bits/istream.tcc
(basic_istream::sentry::sentry): Set failbit and eofbit when eof.
* testsuite/27_io/basic_istream/sentry/char/12297.cc: New.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2110&r2=1.2111
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/istream.tcc.diff?cvsroot=gcc&r1=1.56&r2=1.57
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/12297.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12297
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/12297] istream::sentry::sentry() handles eof() incorrectly.
2003-09-16 9:03 [Bug libstdc++/12297] New: istream::sentry::sentry() handles eof() incorrectly peturr02 at ru dot is
` (3 preceding siblings ...)
2003-11-26 22:46 ` cvs-commit at gcc dot gnu dot org
@ 2003-11-26 22:49 ` cvs-commit at gcc dot gnu dot org
2003-11-26 22:57 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-11-26 22:49 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-11-26 22:49 -------
Subject: Bug 12297
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_3-branch
Changes by: bkoz@gcc.gnu.org 2003-11-26 22:49:28
Modified files:
libstdc++-v3 : ChangeLog
libstdc++-v3/include/bits: istream.tcc
Log message:
2003-11-26 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/12297
* include/bits/istream.tcc
(basic_istream::sentry::sentry): Set failbit and eofbit when eof.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.1464.2.155&r2=1.1464.2.156
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/istream.tcc.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.36.4.7&r2=1.36.4.8
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12297
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/12297] istream::sentry::sentry() handles eof() incorrectly.
2003-09-16 9:03 [Bug libstdc++/12297] New: istream::sentry::sentry() handles eof() incorrectly peturr02 at ru dot is
` (4 preceding siblings ...)
2003-11-26 22:49 ` cvs-commit at gcc dot gnu dot org
@ 2003-11-26 22:57 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-26 22:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-26 22:57 -------
Fixed for 3.3.3.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |3.3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12297
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-11-26 22:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-16 9:03 [Bug libstdc++/12297] New: istream::sentry::sentry() handles eof() incorrectly peturr02 at ru dot is
2003-09-16 10:41 ` [Bug libstdc++/12297] " peturr02 at ru dot is
2003-09-28 21:13 ` pinskia at gcc dot gnu dot org
2003-10-22 20:07 ` bkoz at gcc dot gnu dot org
2003-11-26 22:46 ` cvs-commit at gcc dot gnu dot org
2003-11-26 22:49 ` cvs-commit at gcc dot gnu dot org
2003-11-26 22:57 ` pinskia at gcc dot gnu dot org
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).