libstdc++/2913: iostreams ignore No space left on device condition
donut@azstarnet.com
donut@azstarnet.com
Wed May 23 06:56:00 GMT 2001
>Number: 2913
>Category: libstdc++
>Synopsis: iostreams ignore No space left on device condition
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 23 06:56:02 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Matthew Mueller
>Release: 3.0 20010426 (Debian prerelease) (Debian testing/unstable)
>Organization:
>Environment:
System: Linux charon 2.4.4hpt #1 Thu May 3 15:30:52 MST 2001 i686 unknown
Architecture: i686
host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-x --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux
>Description:
iostreams in the new libstc++ ignore out of space errors, no exception or
error flags are set.
>How-To-Repeat:
nospacetest.cpp:
#include <fstream>
#include <iostream>
using namespace std;
int main(void) {
ofstream foo("foo.bar");
foo << "hellohellohellohello\n";
cout << foo.good() <<" "<< foo.eof() <<" "<< foo.fail() <<" "<< foo.bad() <<"\n";
foo.close();
cout << foo.good() <<" "<< foo.eof() <<" "<< foo.fail() <<" "<< foo.bad() <<"\n";
return 0;
}
mount -t tmpfs tmpfs /mnt -o remount,defaults,size=0k,nr_inodes=1k
cd /mnt
nospacetest
1 0 0 0
1 0 0 0
output when compiled with gcc 2.95:
1 0 0 0
0 0 2 0
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list