public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/13171] New: Bugs in basic_filebuf::imbue
@ 2003-11-24 9:43 peturr02 at ru dot is
2003-11-24 9:44 ` [Bug libstdc++/13171] " peturr02 at ru dot is
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: peturr02 at ru dot is @ 2003-11-24 9:43 UTC (permalink / raw)
To: gcc-bugs
basic_filebuf::imbue hasn't been updated to handle the fix for PR 13007.
1) If pubimbue is called twice with two different locales with the same
name, _M_codecvt points to the (possibly destroyed) facet from the first
locale.
2) If pubimbue is called when a pipe is open, imbue doesn't update
_M_codecvt, so it points to the facet from the old locale.
3) The same thing happens with cin, cout etc.
4) If the old locale has a stateful encoding, imbue does not update
_M_codecvt, even if at the beginning of the file.
--
Summary: Bugs in basic_filebuf::imbue
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
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13171
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/13171] Bugs in basic_filebuf::imbue
2003-11-24 9:43 [Bug libstdc++/13171] New: Bugs in basic_filebuf::imbue peturr02 at ru dot is
2003-11-24 9:44 ` [Bug libstdc++/13171] " peturr02 at ru dot is
@ 2003-11-24 9:44 ` peturr02 at ru dot is
2003-11-24 9:45 ` peturr02 at ru dot is
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: peturr02 at ru dot is @ 2003-11-24 9:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From peturr02 at ru dot is 2003-11-24 09:44 -------
Created an attachment (id=5199)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5199&action=view)
Test case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13171
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/13171] Bugs in basic_filebuf::imbue
2003-11-24 9:43 [Bug libstdc++/13171] New: Bugs in basic_filebuf::imbue peturr02 at ru dot is
@ 2003-11-24 9:44 ` peturr02 at ru dot is
2003-11-24 9:44 ` peturr02 at ru dot is
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: peturr02 at ru dot is @ 2003-11-24 9:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From peturr02 at ru dot is 2003-11-24 09:44 -------
Created an attachment (id=5201)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5201&action=view)
Test case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13171
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/13171] Bugs in basic_filebuf::imbue
2003-11-24 9:43 [Bug libstdc++/13171] New: Bugs in basic_filebuf::imbue peturr02 at ru dot is
2003-11-24 9:44 ` [Bug libstdc++/13171] " peturr02 at ru dot is
2003-11-24 9:44 ` peturr02 at ru dot is
@ 2003-11-24 9:45 ` peturr02 at ru dot is
2003-11-24 9:45 ` peturr02 at ru dot is
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: peturr02 at ru dot is @ 2003-11-24 9:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From peturr02 at ru dot is 2003-11-24 09:44 -------
Created an attachment (id=5202)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5202&action=view)
Test case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13171
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/13171] Bugs in basic_filebuf::imbue
2003-11-24 9:43 [Bug libstdc++/13171] New: Bugs in basic_filebuf::imbue peturr02 at ru dot is
` (2 preceding siblings ...)
2003-11-24 9:45 ` peturr02 at ru dot is
@ 2003-11-24 9:45 ` peturr02 at ru dot is
2003-11-24 12:33 ` paolo at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: peturr02 at ru dot is @ 2003-11-24 9:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From peturr02 at ru dot is 2003-11-24 09:44 -------
Created an attachment (id=5200)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5200&action=view)
Test case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13171
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/13171] Bugs in basic_filebuf::imbue
2003-11-24 9:43 [Bug libstdc++/13171] New: Bugs in basic_filebuf::imbue peturr02 at ru dot is
` (3 preceding siblings ...)
2003-11-24 9:45 ` peturr02 at ru dot is
@ 2003-11-24 12:33 ` paolo at gcc dot gnu dot org
2003-11-26 15:34 ` peturr02 at ru dot is
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: paolo at gcc dot gnu dot org @ 2003-11-24 12:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From paolo at gcc dot gnu dot org 2003-11-24 12:33 -------
Ok ;) Will work on it ASAP, thanks!
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |paolo at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-11-24 12:33:03
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13171
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/13171] Bugs in basic_filebuf::imbue
2003-11-24 9:43 [Bug libstdc++/13171] New: Bugs in basic_filebuf::imbue peturr02 at ru dot is
` (4 preceding siblings ...)
2003-11-24 12:33 ` paolo at gcc dot gnu dot org
@ 2003-11-26 15:34 ` peturr02 at ru dot is
2003-11-26 15:50 ` paolo at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: peturr02 at ru dot is @ 2003-11-26 15:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From peturr02 at ru dot is 2003-11-26 15:34 -------
This should handle all cases when reading or writing a regular file. The
seekoff probably needs to go for proper support for pipes and ttys, but
I see no reason why this shouldn't go in as-is.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13171
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/13171] Bugs in basic_filebuf::imbue
2003-11-24 9:43 [Bug libstdc++/13171] New: Bugs in basic_filebuf::imbue peturr02 at ru dot is
` (5 preceding siblings ...)
2003-11-26 15:34 ` peturr02 at ru dot is
@ 2003-11-26 15:50 ` paolo at gcc dot gnu dot org
2003-11-26 15:56 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: paolo at gcc dot gnu dot org @ 2003-11-26 15:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From paolo at gcc dot gnu dot org 2003-11-26 15:50 -------
Yeah, I see that for pipes and ttys we need something more complex... Your
help is much appreciated, as usual.
Thanks for the review, I'm committing what we have ready.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13171
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/13171] Bugs in basic_filebuf::imbue
2003-11-24 9:43 [Bug libstdc++/13171] New: Bugs in basic_filebuf::imbue peturr02 at ru dot is
` (6 preceding siblings ...)
2003-11-26 15:50 ` paolo at gcc dot gnu dot org
@ 2003-11-26 15:56 ` cvs-commit at gcc dot gnu dot org
2003-11-26 16:04 ` paolo at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-11-26 15:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-11-26 15:56 -------
Subject: Bug 13171
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: paolo@gcc.gnu.org 2003-11-26 15:56:40
Modified files:
libstdc++-v3 : ChangeLog
libstdc++-v3/include/bits: fstream.tcc
libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char: 2.cc 3.cc
libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t: 2.cc
3.cc
12868.cc
Added files:
libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char:
13171-1.cc
13171-2.cc
13171-3.cc
13171-4.cc
Log message:
2003-11-26 Paolo Carlini <pcarlini@suse.de>
Petur Runolfsson <peturr02@ru.is>
PR libstdc++/13171
* include/bits/fstream.tcc (imbue): Relax the conditions under
which the function succeeds: allow for two consecutive calls with
the same name; state dependent encodings are ok even after open
if at the beginning of the file; don't check seekoff return value
(pipes, cin, cout, etc...)
* testsuite/27_io/basic_filebuf/imbue/char/13171-1.cc: New.
* testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: New.
* testsuite/27_io/basic_filebuf/imbue/char/13171-3.cc: New.
* testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc: New.
* testsuite/27_io/basic_filebuf/imbue/char/2.cc: Tweak comment.
* testsuite/27_io/basic_filebuf/imbue/char/3.cc: Likewise.
* testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc: Tweak comment.
* testsuite/27_io/basic_filebuf/imbue/wchar_t/3.cc: Likewise.
* testsuite/27_io/basic_filebuf/imbue/wchar_t/12868.cc: More
correctly use the UTF-8 locale appearing in the PR.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2109&r2=1.2110
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/fstream.tcc.diff?cvsroot=gcc&r1=1.108&r2=1.109
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-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/imbue/char/13171-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/imbue/char/13171-3.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/imbue/char/13171-4.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/imbue/char/2.cc.diff?cvsroot=gcc&r1=1.4&r2=1.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/3.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc.diff?cvsroot=gcc&r1=1.4&r2=1.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/3.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/12868.cc.diff?cvsroot=gcc&r1=1.1&r2=1.2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13171
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/13171] Bugs in basic_filebuf::imbue
2003-11-24 9:43 [Bug libstdc++/13171] New: Bugs in basic_filebuf::imbue peturr02 at ru dot is
` (7 preceding siblings ...)
2003-11-26 15:56 ` cvs-commit at gcc dot gnu dot org
@ 2003-11-26 16:04 ` paolo at gcc dot gnu dot org
2003-11-28 2:32 ` danglin at gcc dot gnu dot org
2003-12-04 9:49 ` pinskia at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: paolo at gcc dot gnu dot org @ 2003-11-26 16:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From paolo at gcc dot gnu dot org 2003-11-26 16:04 -------
Fixed for 3.4.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13171
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/13171] Bugs in basic_filebuf::imbue
2003-11-24 9:43 [Bug libstdc++/13171] New: Bugs in basic_filebuf::imbue peturr02 at ru dot is
` (8 preceding siblings ...)
2003-11-26 16:04 ` paolo at gcc dot gnu dot org
@ 2003-11-28 2:32 ` danglin at gcc dot gnu dot org
2003-12-04 9:49 ` pinskia at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu dot org @ 2003-11-28 2:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From danglin at gcc dot gnu dot org 2003-11-28 02:32 -------
The following errors seem to be occuring on a number of ports including the PA:
PASS: 27_io/basic_filebuf/imbue/char/13171-2.cc (test for excess errors)
WARNING: program timed out.
FAIL: 27_io/basic_filebuf/imbue/char/13171-2.cc execution test
Executing on host: /xxx/gnu/gcc-3.3/objdir/gcc/g++ -shared-libgcc -B/xxx/gnu/gcc
-3.3/objdir/gcc/ -nostdinc++ -L/xxx/gnu/gcc-3.3/objdir/hppa64-hp-hpux11.11/libst
dc++-v3/src -L/xxx/gnu/gcc-3.3/objdir/hppa64-hp-hpux11.11/libstdc++-v3/src/.libs
-B/opt/gnu64/hppa64-hp-hpux11.11/bin/ -B/opt/gnu64/hppa64-hp-hpux11.11/lib/ -is
ystem /opt/gnu64/hppa64-hp-hpux11.11/include -isystem /opt/gnu64/hppa64-hp-hpux1
1.11/sys-include -include bits/stdc++.h -g -O2 -ffunction-sections -fdata-sectio
ns -fmessage-length=0 -DLOCALEDIR="/xxx/gnu/gcc-3.3/objdir/hppa64-hp-hpux11.11/l
ibstdc++-v3/po/share/locale" -nostdinc++ -I/xxx/gnu/gcc-3.3/objdir/hppa64-hp-hpu
x11.11/libstdc++-v3/include/hppa64-hp-hpux11.11 -I/xxx/gnu/gcc-3.3/objdir/hppa64
-hp-hpux11.11/libstdc++-v3/include -I/xxx/gnu/gcc-3.3/gcc/libstdc++-v3/libsupc++
-I/xxx/gnu/gcc-3.3/gcc/libstdc++-v3/libsupc++ -I/xxx/gnu/gcc-3.3/gcc/libstdc++-
v3/include/backward -I/xxx/gnu/gcc-3.3/gcc/libstdc++-v3/testsuite /xxx/gnu/gcc-3
.3/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-3.cc -D_GLI
BCXX_ASSERT -lv3test -L/xxx/gnu/gcc-3.3/objdir/hppa64-hp-hpux11.11//libstdc++-v
3/testsuite -lm -o ./13171-3.exe (timeout = 300)
/xxx/gnu/gcc-3.3/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171
-3.cc: In function `void test01()':
/xxx/gnu/gcc-3.3/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171
-3.cc:40: error: `wcin' undeclared (first use this function)
/xxx/gnu/gcc-3.3/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171
-3.cc:40: error: (Each undeclared identifier is reported only once for each func
tion it appears in.)
/xxx/gnu/gcc-3.3/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171
-3.cc:41: error: `wcout' undeclared (first use this function)
/xxx/gnu/gcc-3.3/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171
-3.cc:42: error: `wcerr' undeclared (first use this function)
/xxx/gnu/gcc-3.3/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171
-3.cc:43: error: `wclog' undeclared (first use this function)
compiler exited with status 1
The 13171-2.c execute test doesn't terminate and needs to be manually
killed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13171
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/13171] Bugs in basic_filebuf::imbue
2003-11-24 9:43 [Bug libstdc++/13171] New: Bugs in basic_filebuf::imbue peturr02 at ru dot is
` (9 preceding siblings ...)
2003-11-28 2:32 ` danglin at gcc dot gnu dot org
@ 2003-12-04 9:49 ` pinskia at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-04 9:49 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13171
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2003-12-04 9:49 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-24 9:43 [Bug libstdc++/13171] New: Bugs in basic_filebuf::imbue peturr02 at ru dot is
2003-11-24 9:44 ` [Bug libstdc++/13171] " peturr02 at ru dot is
2003-11-24 9:44 ` peturr02 at ru dot is
2003-11-24 9:45 ` peturr02 at ru dot is
2003-11-24 9:45 ` peturr02 at ru dot is
2003-11-24 12:33 ` paolo at gcc dot gnu dot org
2003-11-26 15:34 ` peturr02 at ru dot is
2003-11-26 15:50 ` paolo at gcc dot gnu dot org
2003-11-26 15:56 ` cvs-commit at gcc dot gnu dot org
2003-11-26 16:04 ` paolo at gcc dot gnu dot org
2003-11-28 2:32 ` danglin at gcc dot gnu dot org
2003-12-04 9:49 ` 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).