You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@stdcxx.apache.org by "Farid Zaripov (JIRA)" <ji...@apache.org> on 2008/03/25 15:43:27 UTC

[jira] Resolved: (STDCXX-795) std::basic_stringbuf::overflow() writes characters at the begin, but not at the current position if reallocation of internal buffer occurs

     [ https://issues.apache.org/jira/browse/STDCXX-795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Farid Zaripov resolved STDCXX-795.
----------------------------------

    Resolution: Fixed

Fixed thus: http://svn.apache.org/viewvc?rev=640831&view=rev
Regression test added thus: http://svn.apache.org/viewvc?rev=640834&view=rev

Issue will be closed after successfully nightly testing and merging the changes in 4.2.x branch.

> std::basic_stringbuf::overflow() writes characters at the begin, but not at the current position if reallocation of internal buffer occurs
> ------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: STDCXX-795
>                 URL: https://issues.apache.org/jira/browse/STDCXX-795
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 27. Input/Output
>    Affects Versions: 4.2.0
>         Environment: All
>            Reporter: Farid Zaripov
>            Assignee: Farid Zaripov
>             Fix For: 4.2.1
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> From [http://www.mail-archive.com/user@stdcxx.apache.org/msg00014.html]
> The test below asserts on i = 513
> {code:title=test.cpp}
> #include <sstream>
> #include <string>
> #include <cassert>
> int main ()
> {
>     std::ostringstream strm;
>     std::string s;
>     for (size_t i = 1; i <= 1024; ++i) {
>         const char c = char (i);
>         strm << c;
>         s.push_back (c);
>         assert (strm.str () == s);
>     }
>     return 0;
> }
> {code}
> The test output:
> {noformat}
> test: test.cpp:14: int main (): Assertion `strm.str () == s' failed.
> Aborted
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.