Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 38601 invoked from network); 2 Feb 2007 23:05:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Feb 2007 23:05:29 -0000 Received: (qmail 37021 invoked by uid 500); 2 Feb 2007 23:05:35 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 36963 invoked by uid 500); 2 Feb 2007 23:05:35 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 36952 invoked by uid 99); 2 Feb 2007 23:05:35 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Feb 2007 15:05:35 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Feb 2007 15:05:28 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2646D71408A for ; Fri, 2 Feb 2007 15:05:07 -0800 (PST) Message-ID: <24658519.1170457506852.JavaMail.jira@brutus> Date: Fri, 2 Feb 2007 15:05:06 -0800 (PST) From: "Martin Sebor (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Commented: (STDCXX-333) std::wfilebuf extracts more than 1 character from a 1 byte file In-Reply-To: <11976371.1170456305510.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STDCXX-333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469901 ] Martin Sebor commented on STDCXX-333: ------------------------------------- How odd. I can reproduce this but only intermittently and with different results: $ while [ $? -eq 0 ]; do ./t; done; true; while [ $? -eq 0 ]; do ./t; done 97 -1 97 -1 97 -1 97 -1 97 8 t: t.cpp:21: int main(): Assertion `std::wfilebuf::traits_type::eof () == c [1]' failed. Aborted 97 -1 97 -1 97 -1 97 -1 97 -1 97 -1 97 104 : t.cpp:21: int main(): Assertion `std::wfilebuf::traits_type::eof () == c [1]' failed. Aborted > std::wfilebuf extracts more than 1 character from a 1 byte file > --------------------------------------------------------------- > > Key: STDCXX-333 > URL: https://issues.apache.org/jira/browse/STDCXX-333 > Project: C++ Standard Library > Issue Type: Bug > Components: 27. Input/Output > Affects Versions: 4.1.3 > Environment: gcc 3.2.3 on Linux > Reporter: Mark Brown > > I get an an abort when I run the following program on Linux. > #include > #include > #include > int main () > { > { > std::filebuf fb; > fb.open ("file", std::ios::out); > fb.sputc ('a'); > } > std::wfilebuf fb; > fb.pubimbue (std::locale ("en_US.UTF-8")); > fb.open ("file", std::ios::in); > const int c[] = { fb.sbumpc (), fb.sgetc () }; > std::cout << c [0] << ' ' << c [1] << std::endl; > assert (L'a' == c [0]); > assert (std::wfilebuf::traits_type::eof () == c [1]); > } > test: test.cpp:21: int main(): Assertion `std::wfilebuf::traits_type::eof () == c [1]' failed. > Aborted -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.