public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/11544] New: wifstream conversion errors result in wrong rdstate()
@ 2003-07-16  9:43 peturr02 at ru dot is
  2003-07-16 10:33 ` [Bug libstdc++/11544] " paolo at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: peturr02 at ru dot is @ 2003-07-16  9:43 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=11544

           Summary: wifstream conversion errors result in wrong rdstate()
           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

When input using wifstream fails because the file contains an invalid
byte sequence, eofbit, but not badbit, is set in rdstate(). The
description of the rdstate() flags indicates badbit should be set on
conversion errors, but eofbit should only be set if end of file has
been reached.


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

* [Bug libstdc++/11544] wifstream conversion errors result in wrong rdstate()
  2003-07-16  9:43 [Bug libstdc++/11544] New: wifstream conversion errors result in wrong rdstate() peturr02 at ru dot is
@ 2003-07-16 10:33 ` paolo at gcc dot gnu dot org
  2003-07-22  4:20 ` pinskia at physics dot uc dot edu
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo at gcc dot gnu dot org @ 2003-07-16 10:33 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=11544


paolo at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


------- Additional Comments From paolo at gcc dot gnu dot org  2003-07-16 10:33 -------
Testcase?
Thanks,Paolo.


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

* [Bug libstdc++/11544] wifstream conversion errors result in wrong rdstate()
  2003-07-16  9:43 [Bug libstdc++/11544] New: wifstream conversion errors result in wrong rdstate() peturr02 at ru dot is
  2003-07-16 10:33 ` [Bug libstdc++/11544] " paolo at gcc dot gnu dot org
@ 2003-07-22  4:20 ` pinskia at physics dot uc dot edu
  2003-07-22  4:21 ` pinskia at physics dot uc dot edu
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-22  4:20 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=11544


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-22 04:20 -------
Marking as invalid to ...


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

* [Bug libstdc++/11544] wifstream conversion errors result in wrong rdstate()
  2003-07-16  9:43 [Bug libstdc++/11544] New: wifstream conversion errors result in wrong rdstate() peturr02 at ru dot is
  2003-07-16 10:33 ` [Bug libstdc++/11544] " paolo at gcc dot gnu dot org
  2003-07-22  4:20 ` pinskia at physics dot uc dot edu
@ 2003-07-22  4:21 ` pinskia at physics dot uc dot edu
  2003-10-07 23:14 ` paolo at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-22  4:21 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=11544


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-22 04:20 -------
mark as unconfirmed.


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

* [Bug libstdc++/11544] wifstream conversion errors result in wrong rdstate()
  2003-07-16  9:43 [Bug libstdc++/11544] New: wifstream conversion errors result in wrong rdstate() peturr02 at ru dot is
                   ` (2 preceding siblings ...)
  2003-07-22  4:21 ` pinskia at physics dot uc dot edu
@ 2003-10-07 23:14 ` paolo at gcc dot gnu dot org
  2003-10-07 23:23 ` paolo at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo at gcc dot gnu dot org @ 2003-10-07 23:14 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=11544


paolo at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


------- Additional Comments From paolo at gcc dot gnu dot org  2003-10-07 23:14 -------
Hi. Could you please explain in little more detail? The code mentions
27.6.1.1 p3 (eofbit) (and 27.6.1.3 p2 adds failbit)
Thanks!


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

* [Bug libstdc++/11544] wifstream conversion errors result in wrong rdstate()
  2003-07-16  9:43 [Bug libstdc++/11544] New: wifstream conversion errors result in wrong rdstate() peturr02 at ru dot is
                   ` (3 preceding siblings ...)
  2003-10-07 23:14 ` paolo at gcc dot gnu dot org
@ 2003-10-07 23:23 ` paolo at gcc dot gnu dot org
  2003-10-08 12:41 ` peturr02 at ru dot is
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo at gcc dot gnu dot org @ 2003-10-07 23:23 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=11544



------- Additional Comments From paolo at gcc dot gnu dot org  2003-10-07 23:23 -------
... perhaps you believe that rdbuf->sbumpc() should throw an exception in this
case?


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

* [Bug libstdc++/11544] wifstream conversion errors result in wrong rdstate()
  2003-07-16  9:43 [Bug libstdc++/11544] New: wifstream conversion errors result in wrong rdstate() peturr02 at ru dot is
                   ` (4 preceding siblings ...)
  2003-10-07 23:23 ` paolo at gcc dot gnu dot org
@ 2003-10-08 12:41 ` peturr02 at ru dot is
  2003-10-08 13:05 ` paolo at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: peturr02 at ru dot is @ 2003-10-08 12: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=11544



------- Additional Comments From peturr02 at ru dot is  2003-10-08 12:41 -------
Paolo Carlini wrote:
> ... perhaps you believe that rdbuf->sbumpc() should throw an exception in
> this case?

I think that is the only useful solution. Note that there are other reasons
for doing that, such as the one mentioned in PR 11603: If sbumpc() returns
eof() on conversion errors, showmanyc() must always return 0. If showmanyc()
is to be useful, sbumpc() must throw an exception on conversion errors.


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

* [Bug libstdc++/11544] wifstream conversion errors result in wrong rdstate()
  2003-07-16  9:43 [Bug libstdc++/11544] New: wifstream conversion errors result in wrong rdstate() peturr02 at ru dot is
                   ` (5 preceding siblings ...)
  2003-10-08 12:41 ` peturr02 at ru dot is
@ 2003-10-08 13:05 ` paolo at gcc dot gnu dot org
  2003-11-27  9:16 ` paolo at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo at gcc dot gnu dot org @ 2003-10-08 13:05 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=11544


paolo at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-10-08 13:05:20
               date|                            |


------- Additional Comments From paolo at gcc dot gnu dot org  2003-10-08 13:05 -------
I concur, thanks. I think Benjamin is working on those issues...


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

* [Bug libstdc++/11544] wifstream conversion errors result in wrong rdstate()
  2003-07-16  9:43 [Bug libstdc++/11544] New: wifstream conversion errors result in wrong rdstate() peturr02 at ru dot is
                   ` (6 preceding siblings ...)
  2003-10-08 13:05 ` paolo at gcc dot gnu dot org
@ 2003-11-27  9:16 ` paolo at gcc dot gnu dot org
  2003-11-27 17:56 ` cvs-commit at gcc dot gnu dot org
  2003-11-27 22:01 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: paolo at gcc dot gnu dot org @ 2003-11-27  9:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From paolo at gcc dot gnu dot org  2003-11-27 09:16 -------
Will look into it (together with 11603)

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |paolo at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11544


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

* [Bug libstdc++/11544] wifstream conversion errors result in wrong rdstate()
  2003-07-16  9:43 [Bug libstdc++/11544] New: wifstream conversion errors result in wrong rdstate() peturr02 at ru dot is
                   ` (7 preceding siblings ...)
  2003-11-27  9:16 ` paolo at gcc dot gnu dot org
@ 2003-11-27 17:56 ` cvs-commit at gcc dot gnu dot org
  2003-11-27 22:01 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-11-27 17:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-11-27 17:56 -------
Subject: Bug 11544

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	paolo@gcc.gnu.org	2003-11-27 17:56:05

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/include/bits: fstream.tcc 
Added files:
	libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t: 
	                                                              11544-1.cc 
	                                                              11544-2.cc 
	                                                              11603.cc 

Log message:
	2003-11-27  Paolo Carlini  <pcarlini@suse.de>
	
	PR libstdc++/11544
	PR libstdc++/11603
	* include/bits/fstream.tcc (underflow): Throw ios_base:failure
	upon incomplete or invalid byte sequences in the file.
	* testsuite/27_io/basic_filebuf/underflow/wchar_t/11544-1.cc: New.
	* testsuite/27_io/basic_filebuf/underflow/wchar_t/11544-2.cc: New.
	* testsuite/27_io/basic_filebuf/underflow/wchar_t/11603.cc: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2113&r2=1.2114
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/fstream.tcc.diff?cvsroot=gcc&r1=1.110&r2=1.111
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11544-1.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11544-2.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11603.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11544


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

* [Bug libstdc++/11544] wifstream conversion errors result in wrong rdstate()
  2003-07-16  9:43 [Bug libstdc++/11544] New: wifstream conversion errors result in wrong rdstate() peturr02 at ru dot is
                   ` (8 preceding siblings ...)
  2003-11-27 17:56 ` cvs-commit at gcc dot gnu dot org
@ 2003-11-27 22:01 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-27 22:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-11-27 22:01 -------
Fixed for 3.4.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11544


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

end of thread, other threads:[~2003-11-27 22:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-16  9:43 [Bug libstdc++/11544] New: wifstream conversion errors result in wrong rdstate() peturr02 at ru dot is
2003-07-16 10:33 ` [Bug libstdc++/11544] " paolo at gcc dot gnu dot org
2003-07-22  4:20 ` pinskia at physics dot uc dot edu
2003-07-22  4:21 ` pinskia at physics dot uc dot edu
2003-10-07 23:14 ` paolo at gcc dot gnu dot org
2003-10-07 23:23 ` paolo at gcc dot gnu dot org
2003-10-08 12:41 ` peturr02 at ru dot is
2003-10-08 13:05 ` paolo at gcc dot gnu dot org
2003-11-27  9:16 ` paolo at gcc dot gnu dot org
2003-11-27 17:56 ` cvs-commit at gcc dot gnu dot org
2003-11-27 22:01 ` 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).