This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libstdc++/6015: 3.1 pre libstdc++ number formatting is not mt-safe.



>Number:         6015
>Category:       libstdc++
>Synopsis:       3.1 pre libstdc++ number formatting is not mt-safe.
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 20 05:16:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     tot@trema.com
>Release:        3.1 20020320 (prerelease)
>Organization:
>Environment:
all
>Description:
libstdc++ was changed 2002-01-22 to use __convert_from_v to format numbers, and __convert_from_v basically does 

setlocale "C"; sprintf; setlocale back

Unfortunately this is completely not thread safe, since all the other threads will change locales too, thus giving completely unpredictable results.  
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]