Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 798 invoked from network); 28 Jun 2006 19:31:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Jun 2006 19:31:07 -0000 Received: (qmail 18650 invoked by uid 500); 28 Jun 2006 19:31:06 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 18634 invoked by uid 500); 28 Jun 2006 19:31:06 -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 18623 invoked by uid 99); 28 Jun 2006 19:31:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jun 2006 12:31:06 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jun 2006 12:31:05 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D37FF7141F3 for ; Wed, 28 Jun 2006 19:29:29 +0000 (GMT) Message-ID: <4386464.1151522969863.JavaMail.jira@brutus> Date: Wed, 28 Jun 2006 19:29:29 +0000 (GMT+00:00) From: "Martin Sebor (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Created: (STDCXX-233) std::strstreambuf::seekpos() fails to properly position get sequence MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N std::strstreambuf::seekpos() fails to properly position get sequence -------------------------------------------------------------------- Key: STDCXX-233 URL: http://issues.apache.org/jira/browse/STDCXX-233 Project: C++ Standard Library Type: Bug Components: 27. Input/Output Reporter: Martin Sebor Moved from the Rogue Wave bug tracking database: ****Created By: sebor @ Jul 01, 2000 08:28:15 PM**** This program fails with exit status of 1. It exits successfully (with 0) when std::strstreambuf is replaced with std::stringbuf. I don't see anything in D.7.1 that would require this behavior. Looks like a bug... The (enhanced) regress/test_bug10430.cpp exercises this bug and fails as a result. #include int main () { std::strstreambuf sb; sb.sputn ("a", 1); sb.pubseekpos (0); char buf[2] = { 'X', 'Y' }; return !( 1 == sb.sgetn (buf, sizeof buf) && 'a' == buf [0] && 'Y' == buf [1]); } ****Modified By: sebor @ Nov 28, 2000 10:09:20 PM**** $ cat test_bug10430.out ## ------------------------------- ## TestTag = RWQETest test_bug10430 ## CompilerId = g++-2.95.2 ## MachineId = SunOS killer 5.7 Generic_106541-12 sun4u sparc SUNW,Ultra-4 ## Remark = ## RunTag = test_bug10430 regression test ## FunctionTag = Issue #10430 -- streambufs delete passed in buffers. ## StepTag = stringbuf ## StepTag = filebuf ## StepTag = wstringstream ## StepTag = wfilebuf ## StepTag = strstreambuf ## - AssertionTag = strstreambuf::sgetn ("", 11) == 11 (got 11) ## - FileName = /build2/sebor/dev/stdlib/tests/regress/test_bug10430.cpp ## - LineNumber = 102 ## - AssertionTag = strstreambuf::sgetn ("", 11); expected "0123456789" ## - FileName = /build2/sebor/dev/stdlib/tests/regress/test_bug10430.cpp ## - LineNumber = 107 ## - AssertionTag = strstreambuf::setbuf (0, 0) must have no effect ## - FileName = /build2/sebor/dev/stdlib/tests/regress/test_bug10430.cpp ## - LineNumber = 113 ## - AssertionTag = strstreambuf::sgetn ("", 11) == 11 (got 0) ## - FileName = /build2/sebor/dev/stdlib/tests/regress/test_bug10430.cpp ## - LineNumber = 121 ## - AssertionTag = strstreambuf::sgetn ("", 11); expected "0123456789" ## - FileName = /build2/sebor/dev/stdlib/tests/regress/test_bug10430.cpp ## - LineNumber = 126 ## - AssertionTag = strstreambuf<>::setbuf (63720, 1) must fail ## - FileName = /build2/sebor/dev/stdlib/tests/regress/test_bug10430.cpp ## - LineNumber = 133 ## - AssertionTag = strstreambuf<>::setbuf (63720, 1) must succeed ## - FileName = /build2/sebor/dev/stdlib/tests/regress/test_bug10430.cpp ## - LineNumber = 142 ## - AssertionTag = strstreambuf<>::setbuf (63720, 12) must succeed ## - FileName = /build2/sebor/dev/stdlib/tests/regress/test_bug10430.cpp ## - LineNumber = 151 ## - AssertionTag = strstreambuf<>::setbuf (63720, 22) must succeed ## - FileName = /build2/sebor/dev/stdlib/tests/regress/test_bug10430.cpp ## - LineNumber = 160 ## Assertions = 75 ## FailedAssertions = 9 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira