On Sun, Jun 6, 2010 at 12:03 PM, Paolo Carlini <pcarl...@gmail.com> wrote:
>
>> Before I entered a bug I wanted to see if I am actually interpreting
>> this correctly.
>
> Assuming you are, the issue doesn't qualify for Bugzilla, because nobody
> claims to have implemented this section of c++0x.
>
> Paolo

Well, it doesn't look like anyone can ever claim to have "implemented"
the section I pointed out, since this section is requirements on the
library itself.

Regardless, it therefore seems that the claims of thread safety in the
libstdc++ manual are misleading at best and patently false at worst
for any implementation excepting for glibc. The data race exists in
the generic implementation regardless of the platform.  This means
that if the program is running in a locale that uses ',' as a radix
character, you can have unknown results if multiple threads attempt to
do:

 strstream iss ("111,111 222,222 333,333");
 float f;
 iss >> f;  // the values of f can be undetermined due to race with
setlocale and strtod
               // crash can occur due to race between time of
setlocale(LC_ALL, NULL) and memcpy to save it.


So...would you consider this a bug in the documentation, or a bug in
the library?  And even if it's a bug in the documentation, it will
eventually have to be fixed for c++0x, yes?

Reply via email to