stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov (JIRA)" <j...@apache.org>
Subject [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
Date Tue, 25 Mar 2008 14:43:27 GMT

     [ 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.


Mime
View raw message