[ 
https://issues.apache.org/jira/browse/STDCXX-1071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464302#comment-13464302
 ] 

Liviu Nicoara commented on STDCXX-1071:
---------------------------------------

I have attached two minimal patches, one for 4.2.x and one for 4.3.x. They both 
eliminate the facet data caching. The former is binary compatible with 4.2.1, 
the other not. Application of either eliminates the failures in all the builds 
I have performed. As recorded in measurements performed for STDCXX-1056, 
perfect forwarding in the facet interface actually improves performance in 
multi-threaded environ. However, performance is worse in single-threaded builds.
                
> numpunct facet cache initialization is not thread -safe
> -------------------------------------------------------
>
>                 Key: STDCXX-1071
>                 URL: https://issues.apache.org/jira/browse/STDCXX-1071
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 22. Localization, Thread Safety
>    Affects Versions: 4.2.1, 4.2.x, 4.3.x, 5.0.0
>         Environment: $ uname -a; CC -V
> Linux behemoth 2.6.37.6 #3 SMP Sat Apr 9 22:49:32 CDT 2011 x86_64 AMD 
> Opteron(tm) Processor 6134 AuthenticAMD GNU/Linux
> CC: Sun C++ 5.12 Linux_i386 2011/11/16
>            Reporter: Liviu Nicoara
>            Priority: Critical
>              Labels: DCII, localization, numpunct, thread-safety
>             Fix For: 4.2.1, 4.2.x, 4.3.x, 5.0.0
>
>         Attachments: library-reduction.cpp, patch-4.2.x.diff, 
> patch-4.3.x.diff, punct-mt.cpp
>
>   Original Estimate: 8h
>  Remaining Estimate: 8h
>
> The bug affects the initialization of the cached data in numpunct facet. The 
> failing test is 22.locale.numpunct.cpp in certain builds: Linux with SUNPro 
> 5.12, optimized, most likely to fail. It has been reported (see linked 
> incidents) to fail on SPARC as well. It manifests in variate ways: sometimes 
> as heap corruption, sometimes as access violations, etc. Test cases and 
> library reduction programs to follow. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to