stdio_filebuf on current mainline now bypasses the FILE* used to construct it and uses the underlying file descriptor. This breaks any program that does I/O on a FILE* before constructing a stdio_filebuf from it. Release: gcc 3.4 cvs from 20030312 Environment: Red Hat Linux 8.0 How-To-Repeat: See attachment.
Responsible-Changed-From-To: unassigned->paolo Responsible-Changed-Why: I broke it!
State-Changed-From-To: open->analyzed State-Changed-Why: Confirmed.
Benjamin, I'm tentatively assigning this to you as the guy currently working on those issues. Personally, I don't know what should we really do in order to be able to intermix flawlessly the current stdio_filebuf - which, at variance with the old situation ends up always issuing direct non blocking I/O syscalls, i.e., read, write, lseek and so on - with stdio. Perhaps we should just hit the bullet and declare that this is now possible only with stdio_sync_filebuf? What do you think? Paolo.
Paolo Carlini wrote: > Personally, I don't know what should we really do in order to be able to > intermix flawlessly the current stdio_filebuf - which, at variance with the old > situation ends up always issuing direct non blocking I/O syscalls, i.e., read, > write, lseek and so on - with stdio. Since this class doesn't use stdio any more, it should be named something other than stdio_filebuf. > Perhaps we should just hit the bullet and > declare that this is now possible only with stdio_sync_filebuf? Sounds good. stdio_filebuf was never really well suited for this purpose. Petur
Subject: Bug 10063 CVSROOT: /cvs/gcc Module name: gcc Changes by: bkoz@gcc.gnu.org 2003-12-10 17:37:25 Modified files: libstdc++-v3 : ChangeLog libstdc++-v3/config/io: basic_file_stdio.cc Added files: libstdc++-v3/testsuite/ext/stdio_filebuf/char: 10063-1.cc 10063-2.cc Log message: 2003-12-10 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/10063 * config/io/basic_file_stdio.cc (__basic_file::sys_open): Sync. * testsuite/ext/stdio_filebuf/char/10063-1.cc: New. * testsuite/ext/stdio_filebuf/char/10063-2.cc: New. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2148&r2=1.2149 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/io/basic_file_stdio.cc.diff?cvsroot=gcc&r1=1.24&r2=1.25 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/ext/stdio_filebuf/char/10063-1.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/ext/stdio_filebuf/char/10063-2.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
Fixed.