Issue Details (XML | Word | Printable)

Key: STDCXX-640
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Farid Zaripov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library

std::num_get::do_get() parses no more than 128 characters

Created: 02/Nov/07 06:15 PM   Updated: 14/May/08 04:45 PM
Return to search
Component/s: 22. Localization
Affects Version/s: 4.1.2, 4.1.3, 4.1.4, 4.2.0
Fix Version/s: 4.2.2

Time Tracking:
Original Estimate: 4h
Original Estimate - 4h
Remaining Estimate: 4h
Remaining Estimate - 4h
Time Spent: Not Specified
Remaining Estimate - 4h

File Attachments:
  Size
Text File Licensed for inclusion in ASF works stdcxx-640.patch 2008-04-17 07:49 PM Farid Zaripov 11 kB
Environment: All
Issue Links:
Dependants
 

Patch Info: Patch Available
Severity: Incorrect Behavior


 Description  « Hide
The following program fails on assert.
#include <cassert>
#include <sstream>
#include <string>

int main ()
{
    typedef std::num_get<char> NumGet;
    typedef std::istreambuf_iterator<char> Iter;

    std::locale loc;

    for (unsigned i = 0; i < 10000; ++i) {
        std::string s (i, '0');
        s.push_back ('1');

        std::istringstream is (s);

        std::ios::iostate state = std::ios::goodbit;
        long val = 0;

        std::use_facet<NumGet> (loc).get (Iter (is), Iter (), is, state, val);
        assert (1 == val && std::ios::eofbit == state);
    }

    return 0;
}


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no subversion log entries for this issue yet.