public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Brad Garcia <garsh@home.com> To: pme@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: libstdc++/2913 Date: Fri, 16 Nov 2001 23:46:00 -0000 [thread overview] Message-ID: <20011121155600.24540.qmail@sourceware.cygnus.com> (raw) The following reply was made to PR libstdc++/2913; it has been noted by GNATS. From: Brad Garcia <garsh@home.com> To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, donut@azstarnet.com, pme@gcc.gnu.org, gcc-bugs@gcc.gnu.org Cc: Subject: Re: libstdc++/2913 Date: Wed, 21 Nov 2001 11:15:45 -0500 (EST) http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2913&database=gcc We've done some testing and determined that the implementation of basic_filebuf::_M_really_overflow is ignoring the return value of _M_file->sync(). We are seeing sync() return EOF as expected during the out-of-space condition, but since this isn't being checked and propagated, the badbit is not getting set in basic_ios. So this is definitely a bug in libstdc++, not in the operating system. And it's a pretty severe bug. Basically, we will never catch errors that occur when we attempt to close a stream (where the close causes a final flush to occur before actually closing the file). pme said: The current default configuration passes I/O to the stdio fwrite(3) function; the only thing the C++ library knows is what fwrite(3) returns, namely, the bytes successfully written. If something goes wrong (out of space), a short count is returned. The C++ library tests for this condition (in xsputn()) and set the failbit accordingly. If the underlying filesystem doesn't do anything that would cause fwrite(3) to return an error, then the C++ library has nothing to go on. The behavior of the OS kernel and its filesystem drivers also come into play. Brad Garcia
next reply other threads:[~2001-11-21 15:56 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-11-16 23:46 Brad Garcia [this message] -- strict thread matches above, loose matches on Subject: below -- 2001-11-16 23:55 libstdc++/2913 Phil Edwards 2001-06-16 21:36 libstdc++/2913 Matthew Mueller 2001-06-06 16:56 libstdc++/2913 pme
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20011121155600.24540.qmail@sourceware.cygnus.com \ --to=garsh@home.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=pme@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).