libstdc++/6268: _M_extract_buffer_length = 32 for double do_get
kenta@mit.edu
kenta@mit.edu
Thu Apr 11 23:40:00 GMT 2002
>Number: 6268
>Category: libstdc++
>Synopsis: _M_extract_buffer_length = 32 for double do_get
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Apr 11 20:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: kenta@mit.edu
>Release: 3.0.4
>Organization:
>Environment:
i386 Linux (and others probably)
>Description:
In the "double" overloaded version of do_get() (buried inside
i686-pc-linux-gnu/libstdc++-v3/include/bits/locale_facets.tcc), the comment
makes reference to "the size of 256" (line 595 for 3.0.3), but
the array __xtrc is declared to be of length 32 (i.e.,
_M_extract_buffer_length). This is probably a bug.
As far as I can tell, this is what causes failure for
this simple code "double x; cin >> x" and I input
0.12345678901234567890123456789012345678901234567890
Anything more than 30 digits past the decimal point breaks.
I want it to gracefully round or truncate.
>How-To-Repeat:
>Fix:
Don't ever input more than 30 digits past the decimal point.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list