You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Martin Sebor (JIRA)" <ji...@apache.org> on 2007/08/29 03:13:30 UTC
[jira] Updated: (STDCXX-233) std::strstreambuf::seekpos() fails to
properly position get sequence
[ https://issues.apache.org/jira/browse/STDCXX-233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Sebor updated STDCXX-233:
--------------------------------
Affects Version/s: (was: 4.2)
This never did affect 4.2.
> std::strstreambuf::seekpos() fails to properly position get sequence
> --------------------------------------------------------------------
>
> Key: STDCXX-233
> URL: https://issues.apache.org/jira/browse/STDCXX-233
> Project: C++ Standard Library
> Issue Type: Bug
> Components: 27. Input/Output
> Reporter: Martin Sebor
> Assignee: 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 <strstream>
> 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.
-
You can reply to this email to add a comment to the issue online.